Skip to content

Commit

Permalink
minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjiao committed Dec 30, 2024
1 parent 6be4fd0 commit 0081978
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions executor/src/block_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,14 @@ pub fn execute_genesis_transaction<S: StateView + ChainStateWriter + Sync>(
txn_outputs.len()
);
let mut executed_data = BlockExecutedData::default();
let (write_set, events, gas_used, status, _) =
txn_outputs.first().unwrap().clone().into_inner();
// this expect will never fail, as we have checked the output count is 1.
let (write_set, events, gas_used, status, _) = txn_outputs
.first()
.expect("genesis txn must have one output")
.clone()
.into_inner();
let extra_write_set =
extract_extra_writeset(chain_state).expect("extract extra writeset failed");
extract_extra_writeset(chain_state).expect("extract extra write set failed");
let write_set = write_set
.into_mut()
.squash(extra_write_set.into_mut())
Expand Down

0 comments on commit 0081978

Please sign in to comment.