Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(anvil): Add memery limit to anvil node #7482

Merged
merged 11 commits into from
Mar 25, 2024
8 changes: 6 additions & 2 deletions crates/anvil/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ impl Default for NodeConfig {
disable_default_create2_deployer: false,
enable_optimism: false,
slots_in_an_epoch: 32,
memory_limit: Some(10000),
memory_limit: None,
}
}
}
Expand Down Expand Up @@ -839,7 +839,11 @@ impl NodeConfig {
cfg.disable_eip3607 = true;
cfg.disable_block_gas_limit = self.disable_block_gas_limit;
cfg.handler_cfg.is_optimism = self.enable_optimism;
cfg.memory_limit = self.memory_limit.unwrap_or_default();

if let Some(value) = self.memory_limit {
cfg.memory_limit = value;
}
// cfg.memory_limit = self.memory_limit.unwrap_or_default();
mattsse marked this conversation as resolved.
Show resolved Hide resolved

let env = revm::primitives::Env {
cfg: cfg.cfg_env,
Expand Down
Loading