From 3ab0f28ad77346d4516b928e0a925149646bdf4d Mon Sep 17 00:00:00 2001 From: Ben Lao Date: Thu, 2 May 2024 16:46:03 +0800 Subject: [PATCH] fixed bugs in post_execution.rs --- crates/primitives/src/result.rs | 1 - crates/revm/src/handler/mainnet/post_execution.rs | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/primitives/src/result.rs b/crates/primitives/src/result.rs index c354b162b1..9a43bd56bf 100644 --- a/crates/primitives/src/result.rs +++ b/crates/primitives/src/result.rs @@ -31,7 +31,6 @@ pub enum ExecutionResult { output: Output, total_op_count: HashMap, total_time: HashMap - }, /// Reverted by `REVERT` opcode that doesn't spend all gas. Revert { gas_used: u64, output: Bytes }, diff --git a/crates/revm/src/handler/mainnet/post_execution.rs b/crates/revm/src/handler/mainnet/post_execution.rs index 3d33c795b1..57166574b8 100644 --- a/crates/revm/src/handler/mainnet/post_execution.rs +++ b/crates/revm/src/handler/mainnet/post_execution.rs @@ -5,6 +5,7 @@ use crate::{ }, Context, FrameResult, }; +use std::collections::HashMap; /// Mainnet end handle does not change the output. #[inline] @@ -93,7 +94,8 @@ pub fn output( gas_refunded, logs, output, - .. + total_op_count: HashMap::new(), + total_time: HashMap::new() }, SuccessOrHalt::Revert => ExecutionResult::Revert { gas_used: final_gas_used,