perf(rpc): avoid redundant next_env_attributes call in simulate_v1 (#23064)

This commit is contained in:
stevencartavia
2026-03-17 10:15:55 -06:00
committed by GitHub
parent de3033d285
commit 75fa61377a

View File

@@ -127,9 +127,11 @@ pub trait EthCall: EstimateCall + Call + LoadPendingBlock + LoadBlock + FullEthA
.into());
}
let attributes = this.next_env_attributes(&parent)?;
let mut evm_env = this
.evm_config()
.next_evm_env(&parent, &this.next_env_attributes(&parent)?)
.next_evm_env(&parent, &attributes)
.map_err(RethError::other)
.map_err(Self::Error::from_eth_err)?;
@@ -205,7 +207,7 @@ pub trait EthCall: EstimateCall + Call + LoadPendingBlock + LoadBlock + FullEthA
let ctx = this
.evm_config()
.context_for_next_block(&parent, this.next_env_attributes(&parent)?)
.context_for_next_block(&parent, attributes)
.map_err(RethError::other)
.map_err(Self::Error::from_eth_err)?;
let map_err = |e: EthApiError| -> Self::Error {