Skip to content

Commit

Permalink
refactor: change the create contract limit config
Browse files Browse the repository at this point in the history
  • Loading branch information
Eason authored and Flouse committed Sep 26, 2023
1 parent 9ce5aa0 commit 51179a3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions core/executor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl Executor for AxonExecutor {
value: U256,
data: Vec<u8>,
) -> TxResp {
let config = Config::london();
let config = self.config();
let metadata = StackSubstateMetadata::new(gas_limit, &config);
let state = MemoryStackState::new(metadata, backend);
let precompiles = build_precompile_set();
Expand Down Expand Up @@ -134,7 +134,7 @@ impl Executor for AxonExecutor {
let mut hashes = Vec::with_capacity(txs_len);
let (mut gas, mut fee) = (0u64, U256::zero());
let precompiles = build_precompile_set();
let config = Config::london();
let config = self.config();

self.init_local_system_contract_roots(adapter);

Expand Down Expand Up @@ -316,6 +316,12 @@ impl AxonExecutor {
});
}

fn config(&self) -> Config {
let mut config = Config::london();
config.create_contract_limit = Some(0xc000);
config
}

#[cfg(test)]
fn test_exec<Adapter: ExecutorAdapter>(
&self,
Expand Down

0 comments on commit 51179a3

Please sign in to comment.