chore: block gas limit constant (#3224)

This commit is contained in:
Roman Krasiuk
2023-06-19 15:54:30 +03:00
committed by GitHub
parent 1049202f0f
commit b9c19e82b2
5 changed files with 22 additions and 13 deletions

View File

@ -16,7 +16,10 @@ use crate::{
PoolConfig, PoolResult, PoolTransaction, TransactionOrdering, ValidPoolTransaction, U256,
};
use fnv::FnvHashMap;
use reth_primitives::{constants::MIN_PROTOCOL_BASE_FEE, TxHash, H256};
use reth_primitives::{
constants::{ETHEREUM_BLOCK_GAS_LIMIT, MIN_PROTOCOL_BASE_FEE},
TxHash, H256,
};
use std::{
cmp::Ordering,
collections::{btree_map::Entry, hash_map, BTreeMap, HashMap},
@ -1163,7 +1166,7 @@ impl<T: PoolTransaction> Default for AllTransactions<T> {
Self {
max_account_slots: MAX_ACCOUNT_SLOTS_PER_SENDER,
minimal_protocol_basefee: MIN_PROTOCOL_BASE_FEE,
block_gas_limit: 30_000_000,
block_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT,
by_hash: Default::default(),
txs: Default::default(),
tx_counter: Default::default(),

View File

@ -7,9 +7,9 @@ use crate::{
MAX_INIT_CODE_SIZE, TX_MAX_SIZE,
};
use reth_primitives::{
Address, ChainSpec, IntoRecoveredTransaction, InvalidTransactionError, TransactionKind,
TransactionSignedEcRecovered, TxHash, EIP1559_TX_TYPE_ID, EIP2930_TX_TYPE_ID,
LEGACY_TX_TYPE_ID, U256,
constants::ETHEREUM_BLOCK_GAS_LIMIT, Address, ChainSpec, IntoRecoveredTransaction,
InvalidTransactionError, TransactionKind, TransactionSignedEcRecovered, TxHash,
EIP1559_TX_TYPE_ID, EIP2930_TX_TYPE_ID, LEGACY_TX_TYPE_ID, U256,
};
use reth_provider::{AccountReader, StateProviderFactory};
use std::{fmt, marker::PhantomData, sync::Arc, time::Instant};
@ -138,7 +138,7 @@ impl<Client, Tx> EthTransactionValidator<Client, Tx> {
shanghai: true,
eip2718: true,
eip1559: true,
block_gas_limit: 30_000_000,
block_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT,
minimum_priority_fee: None,
_marker: Default::default(),
}