mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-06-20 15:01:06 +00:00
Cleanups
This commit is contained in:
@@ -602,10 +602,6 @@ pub struct KitchensinkConfiguration {
|
|||||||
value_parser = parse_duration
|
value_parser = parse_duration
|
||||||
)]
|
)]
|
||||||
pub start_timeout_ms: Duration,
|
pub start_timeout_ms: Duration,
|
||||||
|
|
||||||
/// This configures the tool to use Kitchensink instead of using the revive-dev-node.
|
|
||||||
#[clap(long = "kitchensink.dont-use-dev-node")]
|
|
||||||
pub use_kitchensink: bool,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A set of configuration parameters for the revive dev node.
|
/// A set of configuration parameters for the revive dev node.
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ impl NodePool {
|
|||||||
.join()
|
.join()
|
||||||
.map_err(|error| anyhow::anyhow!("failed to spawn node: {:?}", error))
|
.map_err(|error| anyhow::anyhow!("failed to spawn node: {:?}", error))
|
||||||
.context("Failed to join node spawn thread")?
|
.context("Failed to join node spawn thread")?
|
||||||
.map_err(|error| anyhow::anyhow!("node failed to spawn: {error}"))
|
|
||||||
.context("Node failed to spawn")?,
|
.context("Node failed to spawn")?,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -149,6 +149,7 @@ impl SubstrateNode {
|
|||||||
.arg(self.export_chainspec_command.as_str())
|
.arg(self.export_chainspec_command.as_str())
|
||||||
.arg("--chain")
|
.arg("--chain")
|
||||||
.arg("dev")
|
.arg("dev")
|
||||||
|
.env_remove("RUST_LOG")
|
||||||
.output()
|
.output()
|
||||||
.context("Failed to export the chain-spec")?;
|
.context("Failed to export the chain-spec")?;
|
||||||
|
|
||||||
@@ -520,11 +521,13 @@ impl EthereumNode for SubstrateNode {
|
|||||||
.provider()
|
.provider()
|
||||||
.await
|
.await
|
||||||
.context("Failed to create the provider for block subscription")?;
|
.context("Failed to create the provider for block subscription")?;
|
||||||
let block_subscription = provider.subscribe_full_blocks();
|
let mut block_subscription = provider
|
||||||
let block_stream = block_subscription
|
.watch_full_blocks()
|
||||||
.into_stream()
|
|
||||||
.await
|
.await
|
||||||
.context("Failed to create the block stream")?;
|
.context("Failed to create the blocks stream")?;
|
||||||
|
block_subscription.set_channel_size(0xFFFF);
|
||||||
|
block_subscription.set_poll_interval(Duration::from_secs(1));
|
||||||
|
let block_stream = block_subscription.into_stream();
|
||||||
|
|
||||||
let mined_block_information_stream = block_stream.filter_map(|block| async {
|
let mined_block_information_stream = block_stream.filter_map(|block| async {
|
||||||
let block = block.ok()?;
|
let block = block.ok()?;
|
||||||
@@ -1149,9 +1152,7 @@ mod tests {
|
|||||||
use crate::Node;
|
use crate::Node;
|
||||||
|
|
||||||
fn test_config() -> TestExecutionContext {
|
fn test_config() -> TestExecutionContext {
|
||||||
let mut context = TestExecutionContext::default();
|
TestExecutionContext::default()
|
||||||
context.kitchensink_configuration.use_kitchensink = true;
|
|
||||||
context
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn new_node() -> (TestExecutionContext, SubstrateNode) {
|
fn new_node() -> (TestExecutionContext, SubstrateNode) {
|
||||||
|
|||||||
Reference in New Issue
Block a user