fix: Fix tx_index for patches

This commit is contained in:
sprites0
2025-06-23 02:18:04 +00:00
parent dda18be9b5
commit 3896e7c645

View File

@ -146,14 +146,6 @@ where
if !is_system_transaction(tx.tx()) {
self.gas_used += gas_used;
}
self.receipts
.push(self.receipt_builder.build_receipt(ReceiptBuilderCtx {
tx: tx.tx(),
evm: &self.evm,
result,
state: &state,
cumulative_gas_used: self.gas_used,
}));
// apply patches after
patch_mainnet_after_tx(
@ -163,6 +155,15 @@ where
&mut state,
)?;
self.receipts
.push(self.receipt_builder.build_receipt(ReceiptBuilderCtx {
tx: tx.tx(),
evm: &self.evm,
result,
state: &state,
cumulative_gas_used: self.gas_used,
}));
self.evm.db_mut().commit(state);
Ok(gas_used)