Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nbaztec committed Jan 27, 2025
1 parent b14aacb commit e3c3865
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/anvil/src/eth/backend/mem/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,8 +528,6 @@ impl Backend {
.ok_or(BlockchainError::BlockNotFound)?;
// update all settings related to the forked block
{
let maybe_rpc_url = { self.node_config.read().await.eth_rpc_url.clone() };

if let Some(fork_url) = forking.json_rpc_url.or(maybe_rpc_url) {

Check failure on line 531 in crates/anvil/src/eth/backend/mem/mod.rs

View workflow job for this annotation

GitHub Actions / zk-cargo-test

cannot find value `maybe_rpc_url` in this scope

Check failure on line 531 in crates/anvil/src/eth/backend/mem/mod.rs

View workflow job for this annotation

GitHub Actions / zk-cargo-test

cannot find value `maybe_rpc_url` in this scope
// Set the fork block number
let mut node_config = self.node_config.write().await;
Expand All @@ -544,7 +542,8 @@ impl Backend {
*self.fork.write() = Some(fork);
*self.env.write() = env;
} else {
// Set cache path on correct block
// If rpc url is unspecified, then update the fork with the new block number and
// existing rpc url, this updates the cache path
{
let maybe_fork_url = { self.node_config.read().await.eth_rpc_url.clone() };
if let Some(fork_url) = maybe_fork_url {
Expand Down

0 comments on commit e3c3865

Please sign in to comment.