Skip to content

Commit

Permalink
Try to mine a block
Browse files Browse the repository at this point in the history
  • Loading branch information
squadgazzz committed Jan 2, 2025
1 parent 6304a87 commit e0623b6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions crates/e2e/src/setup/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use {
time::Duration,
},
tempfile::TempPath,
web3::Transport,
};
pub use {deploy::*, onchain_components::*, services::*, solver::*};

Expand Down Expand Up @@ -232,8 +233,12 @@ async fn try_spawn_node_and_check(
let http = create_test_transport(NODE_HOST);
let web3 = Web3::new(http);

let block_check = tokio::time::timeout(Duration::from_secs(2), web3.eth().block_number()).await;
match block_check {
let mine_check = tokio::time::timeout(
Duration::from_secs(2),
web3.transport().execute("evm_mine", vec![]),
)
.await;
match mine_check {
Ok(Ok(_)) => Some((node, web3)),
_ => {
let node = node.lock().unwrap().take();
Expand Down

0 comments on commit e0623b6

Please sign in to comment.