mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-04-22 10:17:56 +00:00
6f4aa731ab
* Add support for wrapper types * Move `FilesWithExtensionIterator` to `core::common` * Remove unneeded use of two `HashMap`s * Make metadata structs more typed * Impl new_from for wrapper types * Implement the new input handling logic * Fix edge-case in input handling * Ignore macro doc comment tests * Correct comment * Fix edge-case in deployment order * Handle calldata better * Allow for the use of function signatures * Add support for exceptions * Cached nonce allocator * Fix tests * Add support for address replacement * Cleanup implementation * Cleanup mutability * Wire up address replacement with rest of code * Implement caller replacement * Switch to callframe trace for exceptions * Add a way to skip tests if they don't match the target * Handle values from the metadata files * Remove address replacement * Correct the arguments * Remove empty impl * Remove address replacement * Correct the arguments * Remove empty impl * Fix size_requirement underflow * Add support for wildcards in exceptions * Fix calldata construction of single calldata * Better handling for length in equivalency checks * Make initial balance a constant * Fix size_requirement underflow * Add support for wildcards in exceptions * Fix calldata construction of single calldata * Better handling for length in equivalency checks * Fix tests
40 lines
1.2 KiB
Rust
40 lines
1.2 KiB
Rust
//! This crate implements the testing nodes.
|
|
|
|
use revive_dt_config::Arguments;
|
|
use revive_dt_node_interaction::EthereumNode;
|
|
|
|
pub mod common;
|
|
pub mod constants;
|
|
pub mod geth;
|
|
pub mod kitchensink;
|
|
pub mod pool;
|
|
|
|
/// The default genesis configuration.
|
|
pub const GENESIS_JSON: &str = include_str!("../../../genesis.json");
|
|
|
|
/// An abstract interface for testing nodes.
|
|
pub trait Node: EthereumNode {
|
|
/// Create a new uninitialized instance.
|
|
fn new(config: &Arguments) -> Self;
|
|
|
|
/// Spawns a node configured according to the genesis json.
|
|
///
|
|
/// Blocking until it's ready to accept transactions.
|
|
fn spawn(&mut self, genesis: String) -> anyhow::Result<()>;
|
|
|
|
/// Prune the node instance and related data.
|
|
///
|
|
/// Blocking until it's completely stopped.
|
|
fn shutdown(&mut self) -> anyhow::Result<()>;
|
|
|
|
/// Returns the nodes connection string.
|
|
fn connection_string(&self) -> String;
|
|
|
|
/// Returns the node version.
|
|
fn version(&self) -> anyhow::Result<String>;
|
|
|
|
/// Given a list of targets from the metadata file, this function determines if the metadata
|
|
/// file can be ran on this node or not.
|
|
fn matches_target(&self, targets: Option<&[String]>) -> bool;
|
|
}
|