Skip to content

Commit

Permalink
Added methods
Browse files Browse the repository at this point in the history
  • Loading branch information
mrLSD committed Sep 19, 2023
1 parent ce649ab commit 8e85ebf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ extern crate alloc;

mod error;
mod eval;
mod external;
mod memory;
mod opcode;
mod stack;
mod utils;
mod valids;
mod external;

pub use crate::error::{Capture, ExitError, ExitFatal, ExitReason, ExitRevert, ExitSucceed, Trap};
pub use crate::external::ExternalOperation;
Expand Down
19 changes: 18 additions & 1 deletion src/executor/stack/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,24 @@ pub trait StackState<'config>: Backend {
Ok(())
}

fn record_external_dynamic_opcode_cost(
&mut self,
_opcode: Opcode,
_gas_cost: crate::gasometer::GasCost,
_target: StorageTarget,
) -> Result<(), ExitError> {
Ok(())
}

fn record_external_cost(
&mut self,
_ref_time: Option<u64>,
_proof_size: Option<u64>,
_storage_growth: Option<u64>,
) -> Result<(), ExitError> {
Ok(())
}

fn refund_external_cost(&mut self, _ref_time: Option<u64>, _proof_size: Option<u64>) {}
}

Expand Down Expand Up @@ -1516,7 +1534,6 @@ impl<'inner, 'config, 'precompiles, S: StackState<'config>, P: PrecompileSet> Pr
.record_external_cost(ref_time, proof_size, storage_growth)
}


/// Refund Substrate specific cost.
fn refund_external_cost(&mut self, ref_time: Option<u64>, proof_size: Option<u64>) {
self.executor
Expand Down

0 comments on commit 8e85ebf

Please sign in to comment.