Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.

Commit ff40c59

Browse files
authored
Merge pull request #371 from ethereum/rust-revert
rust: ExecutionResult::result() should have a gas parameter
2 parents 9b2df0f + b9de847 commit ff40c59

File tree

1 file changed

+3
-3
lines changed
  • bindings/rust/evmc-vm/src

1 file changed

+3
-3
lines changed

bindings/rust/evmc-vm/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ impl ExecutionResult {
8080
ExecutionResult::new(ffi::evmc_status_code::EVMC_FAILURE, 0, None)
8181
}
8282

83-
pub fn revert(_output: Option<&[u8]>) -> Self {
84-
ExecutionResult::new(ffi::evmc_status_code::EVMC_REVERT, 0, _output)
83+
pub fn revert(_gas_left: i64, _output: Option<&[u8]>) -> Self {
84+
ExecutionResult::new(ffi::evmc_status_code::EVMC_REVERT, _gas_left, _output)
8585
}
8686

8787
pub fn success(_gas_left: i64, _output: Option<&[u8]>) -> Self {
@@ -184,7 +184,7 @@ impl<'a> ExecutionContext<'a> {
184184
}
185185
}
186186

187-
pub fn get_tx_context(&mut self) -> &ExecutionTxContext {
187+
pub fn get_tx_context(&self) -> &ExecutionTxContext {
188188
&self.tx_context
189189
}
190190

0 commit comments

Comments
 (0)