Skip to content

Commit

Permalink
fix: enable estimation mode for query apis (#1603)
Browse files Browse the repository at this point in the history
  • Loading branch information
yangby-cryptape authored Nov 29, 2023
1 parent 0457119 commit 0375d87
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/executor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@ impl Executor for AxonExecutor {
data: Vec<u8>,
) -> TxResp {
self.init_local_system_contract_roots(backend);
let config = self.config();
let config = {
let mut config = self.config();
// run the gasometer in estimate mode
config.estimate = true;
config
};
let metadata = StackSubstateMetadata::new(gas_limit, &config);
let state = MemoryStackState::new(metadata, backend);
let precompiles = build_precompile_set();
Expand Down

0 comments on commit 0375d87

Please sign in to comment.