From 16733e01fe2bec1eaee5a484abeb4c5e09cb585d Mon Sep 17 00:00:00 2001 From: Bjerg Date: Fri, 17 Mar 2023 18:51:02 +0100 Subject: [PATCH] chore: small nits in executor from #1674 (#1823) --- 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 6a8acf4209..2e56a72090 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));