We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e74bf0e commit ed79650Copy full SHA for ed79650
crates/anvil/src/cmd.rs
@@ -208,9 +208,9 @@ impl NodeArgs {
208
match (self.evm_opts.fork_block_number, self.evm_opts.fork_transaction_hash) {
209
(Some(block), None) => Some(ForkChoice::Block(block)),
210
(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
- )),
+ _ => {
+ self.evm_opts.fork_url.as_ref().and_then(|f| f.block).map(ForkChoice::Block)
+ }
214
},
215
)
216
.with_fork_headers(self.evm_opts.fork_headers)
0 commit comments