Skip to content

Commit ed79650

Browse files
authored
fix: forkchoice match checks (#8299)
1 parent e74bf0e commit ed79650

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/anvil/src/cmd.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ impl NodeArgs {
208208
match (self.evm_opts.fork_block_number, self.evm_opts.fork_transaction_hash) {
209209
(Some(block), None) => Some(ForkChoice::Block(block)),
210210
(None, Some(hash)) => Some(ForkChoice::Transaction(hash)),
211-
_ => Some(ForkChoice::Block(
212-
self.evm_opts.fork_url.as_ref().and_then(|f| f.block).unwrap(),
213-
)),
211+
_ => {
212+
self.evm_opts.fork_url.as_ref().and_then(|f| f.block).map(ForkChoice::Block)
213+
}
214214
},
215215
)
216216
.with_fork_headers(self.evm_opts.fork_headers)

0 commit comments

Comments
 (0)