Skip to content

Commit

Permalink
fix(anvil): block block mining in place (foundry-rs#1996)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Jun 16, 2022
1 parent 797f222 commit 0e69006
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions anvil/src/eth/backend/mem/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,10 @@ impl Backend {
/// this will execute all transaction in the order they come in and return all the markers they
/// provide.
pub fn mine_block(&self, pool_transactions: Vec<Arc<PoolTransaction>>) -> MinedBlockOutcome {
tokio::task::block_in_place(|| self.do_mine_block(pool_transactions))
}

fn do_mine_block(&self, pool_transactions: Vec<Arc<PoolTransaction>>) -> MinedBlockOutcome {
trace!(target: "backend", "creating new block with {} transactions", pool_transactions.len());

let current_base_fee = self.base_fee();
Expand Down

0 comments on commit 0e69006

Please sign in to comment.