Skip to content

Commit 1a293cd

Browse files
committed
fixup! node: upgrade tendermint to 0.38
1 parent 63af9f5 commit 1a293cd

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

crates/node/src/shell/finalize_block.rs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -732,14 +732,6 @@ where
732732

733733
let result_code = ResultCode::from_u32(processed_tx.result.code)
734734
.expect("Result code conversion should not fail");
735-
// The number of the `tx_results` has to match the number of txs in
736-
// request, otherwise Comet crashes consensus with "failed to apply
737-
// block; error expected tx results length to match size of
738-
// transactions in block."
739-
tx_results.push(tendermint::abci::types::ExecTxResult {
740-
code: result_code.into(),
741-
..Default::default()
742-
});
743735

744736
let tx_header = tx.header();
745737
// If [`process_proposal`] rejected a Tx, emit an event here and
@@ -902,7 +894,18 @@ where
902894
let consumed_gas = tx_gas_meter.get_consumed_gas();
903895

904896
// save the gas cost
905-
self.update_tx_gas(tx_hash, consumed_gas);
897+
self.update_tx_gas(tx_hash, consumed_gas.clone());
898+
899+
// The number of the `tx_results` has to match the number of txs in
900+
// request, otherwise Comet crashes consensus with "failed to apply
901+
// block; error expected tx results length to match size of
902+
// transactions in block."
903+
tx_results.push(tendermint::abci::types::ExecTxResult {
904+
code: result_code.into(),
905+
gas_used: i64::try_from(u64::from(consumed_gas))
906+
.unwrap_or_default(),
907+
..Default::default()
908+
});
906909

907910
if let Some(wrapper_cache) = self.evaluate_tx_result(
908911
events,

0 commit comments

Comments
 (0)