mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
Compare commits
3 Commits
6bf25558b9
...
f109130f88
| Author | SHA1 | Date | |
|---|---|---|---|
| f109130f88 | |||
| 010d056aad | |||
| 821c63494e |
@ -1,4 +1,5 @@
|
|||||||
//! Copy of reth codebase to preserve serialization compatibility
|
//! Copy of reth codebase to preserve serialization compatibility
|
||||||
|
use crate::chainspec::TESTNET_CHAIN_ID;
|
||||||
use crate::node::storage::tables::{SPOT_METADATA_KEY, SpotMetadata};
|
use crate::node::storage::tables::{SPOT_METADATA_KEY, SpotMetadata};
|
||||||
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, Bytes, Signature, TxKind, U256};
|
use alloy_primitives::{Address, BlockHash, Bytes, Signature, TxKind, U256};
|
||||||
@ -160,13 +161,15 @@ impl SealedBlock {
|
|||||||
&self,
|
&self,
|
||||||
read_precompile_calls: ReadPrecompileCalls,
|
read_precompile_calls: ReadPrecompileCalls,
|
||||||
highest_precompile_address: Option<Address>,
|
highest_precompile_address: Option<Address>,
|
||||||
system_txs: Vec<super::SystemTx>,
|
mut system_txs: Vec<super::SystemTx>,
|
||||||
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: Filter out system transactions that may be rejected by the EVM (tracked by #97,
|
||||||
// testnet only).
|
// testnet only).
|
||||||
let system_txs: Vec<_> = system_txs.into_iter().filter(|tx| tx.gas_limit() != 0).collect();
|
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)));
|
||||||
|
|||||||
Reference in New Issue
Block a user