fix: Adjust transaction parser based on observation on all blocks in both networks

Tracked by #97
This commit is contained in:
sprites0
2025-11-05 06:54:43 +00:00
parent 010d056aad
commit 387acd1024

View File

@ -1,5 +1,4 @@
//! Copy of reth codebase to preserve serialization compatibility //! Copy of reth codebase to preserve serialization compatibility
use crate::chainspec::TESTNET_CHAIN_ID;
use alloy_consensus::{Header, Signed, TxEip1559, TxEip2930, TxEip4844, TxEip7702, TxLegacy}; use alloy_consensus::{Header, Signed, TxEip1559, TxEip2930, TxEip4844, TxEip7702, TxLegacy};
use alloy_primitives::{Address, BlockHash, Signature, TxKind, U256}; use alloy_primitives::{Address, BlockHash, Signature, TxKind, U256};
use reth_primitives::TransactionSigned as RethTxSigned; use reth_primitives::TransactionSigned as RethTxSigned;
@ -118,11 +117,8 @@ impl SealedBlock {
receipts: Vec<LegacyReceipt>, receipts: Vec<LegacyReceipt>,
chain_id: u64, chain_id: u64,
) -> HlBlock { ) -> HlBlock {
// NOTE: Filter out system transactions that may be rejected by the EVM (tracked by #97, // NOTE: These types of transactions are tracked at #97.
// testnet only). system_txs.retain(|tx| tx.receipt.is_some());
if chain_id == TESTNET_CHAIN_ID {
system_txs = system_txs.into_iter().filter(|tx| tx.receipt.is_some()).collect();
}
let mut merged_txs = vec![]; let mut merged_txs = vec![];
merged_txs.extend(system_txs.iter().map(|tx| system_tx_to_reth_transaction(tx, chain_id))); merged_txs.extend(system_txs.iter().map(|tx| system_tx_to_reth_transaction(tx, chain_id)));