Merge pull request #371 from ethereum/rust-revert

rust: ExecutionResult::result() should have a gas parameter
This commit is contained in:
Alex Beregszaszi 2019-07-24 13:30:52 +01:00 committed by GitHub
commit ff40c5983b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -80,8 +80,8 @@ impl ExecutionResult {
ExecutionResult::new(ffi::evmc_status_code::EVMC_FAILURE, 0, None)
}
pub fn revert(_output: Option<&[u8]>) -> Self {
ExecutionResult::new(ffi::evmc_status_code::EVMC_REVERT, 0, _output)
pub fn revert(_gas_left: i64, _output: Option<&[u8]>) -> Self {
ExecutionResult::new(ffi::evmc_status_code::EVMC_REVERT, _gas_left, _output)
}
pub fn success(_gas_left: i64, _output: Option<&[u8]>) -> Self {
@ -184,7 +184,7 @@ impl<'a> ExecutionContext<'a> {
}
}
pub fn get_tx_context(&mut self) -> &ExecutionTxContext {
pub fn get_tx_context(&self) -> &ExecutionTxContext {
&self.tx_context
}