From 0081978e50ae48e8bfe761d4d6a977718929f0b4 Mon Sep 17 00:00:00 2001 From: simonjiao Date: Mon, 30 Dec 2024 14:03:08 +0800 Subject: [PATCH] minor update --- executor/src/block_executor.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/executor/src/block_executor.rs b/executor/src/block_executor.rs index e49545000e..8995b46df5 100644 --- a/executor/src/block_executor.rs +++ b/executor/src/block_executor.rs @@ -82,10 +82,14 @@ pub fn execute_genesis_transaction( 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())