Skip to content

Commit

Permalink
fix: forkchoice match checks (#8299)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Jun 29, 2024
1 parent e74bf0e commit ed79650
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/anvil/src/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,9 @@ impl NodeArgs {
match (self.evm_opts.fork_block_number, self.evm_opts.fork_transaction_hash) {
(Some(block), None) => Some(ForkChoice::Block(block)),
(None, Some(hash)) => Some(ForkChoice::Transaction(hash)),
_ => Some(ForkChoice::Block(
self.evm_opts.fork_url.as_ref().and_then(|f| f.block).unwrap(),
)),
_ => {
self.evm_opts.fork_url.as_ref().and_then(|f| f.block).map(ForkChoice::Block)
}
},
)
.with_fork_headers(self.evm_opts.fork_headers)
Expand Down

0 comments on commit ed79650

Please sign in to comment.