From aa690b4d38f440bc2e71e7ebe565fbac9816eea8 Mon Sep 17 00:00:00 2001 From: Oliver Nordbjerg Date: Fri, 17 Mar 2023 18:42:02 +0100 Subject: [PATCH] chore: small nits in executor from #1674 --- crates/executor/src/executor.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/executor/src/executor.rs b/crates/executor/src/executor.rs index 6a8acf4209d..2e56a72090c 100644 --- a/crates/executor/src/executor.rs +++ b/crates/executor/src/executor.rs @@ -373,6 +373,8 @@ where /// The changes in [PostState] have a transition ID associated with them: there is one /// transition ID for each transaction (with the first executed tx having transition ID 0, and /// so on). + /// + /// The second returned value represents the total gas used by this block of transactions. pub fn execute_transactions( &mut self, block: &Block, @@ -657,7 +659,11 @@ mod tests { let mut executor = Executor::new(chain_spec, db); let post_state = executor.execute_and_verify_receipt(&block, U256::ZERO, None).unwrap(); - assert_eq!(post_state.transitions_count(), 2, "Should executed one transaction"); + assert_eq!( + post_state.transitions_count(), + 2, + "Should executed two transitions (1 tx and 1 block reward)" + ); let block_reward = U256::from(WEI_2ETH + (WEI_2ETH >> 5));