primitive-traits: use alloy MIN_PROTOCOL_BASE_FEE constant (#12037)

This commit is contained in:
Thomas Coratger
2024-10-24 14:29:24 +02:00
committed by GitHub
parent 8b317f206f
commit bea6e278df
7 changed files with 10 additions and 40 deletions

View File

@ -3,9 +3,8 @@ use crate::{
PoolSize, TransactionOrigin,
};
use alloy_consensus::constants::EIP4844_TX_TYPE_ID;
use alloy_eips::eip1559::ETHEREUM_BLOCK_GAS_LIMIT;
use alloy_eips::eip1559::{ETHEREUM_BLOCK_GAS_LIMIT, MIN_PROTOCOL_BASE_FEE};
use alloy_primitives::Address;
use reth_primitives::constants::MIN_PROTOCOL_BASE_FEE;
use std::{collections::HashSet, ops::Mul};
/// Guarantees max transactions for one sender, compatible with geth/erigon

View File

@ -22,9 +22,9 @@ use alloy_consensus::constants::{
EIP1559_TX_TYPE_ID, EIP2930_TX_TYPE_ID, EIP4844_TX_TYPE_ID, EIP7702_TX_TYPE_ID,
LEGACY_TX_TYPE_ID,
};
use alloy_eips::eip1559::ETHEREUM_BLOCK_GAS_LIMIT;
use alloy_eips::eip1559::{ETHEREUM_BLOCK_GAS_LIMIT, MIN_PROTOCOL_BASE_FEE};
use alloy_primitives::{Address, TxHash, B256};
use reth_primitives::constants::{eip4844::BLOB_TX_MIN_BLOB_GASPRICE, MIN_PROTOCOL_BASE_FEE};
use reth_primitives::constants::eip4844::BLOB_TX_MIN_BLOB_GASPRICE;
use rustc_hash::FxHashMap;
use smallvec::SmallVec;
use std::{

View File

@ -1,12 +1,10 @@
use crate::EthPooledTransaction;
use alloy_consensus::{TxEip1559, TxEip4844, TxLegacy};
use alloy_eips::{eip2718::Encodable2718, eip2930::AccessList};
use alloy_eips::{eip1559::MIN_PROTOCOL_BASE_FEE, eip2718::Encodable2718, eip2930::AccessList};
use alloy_primitives::{Address, Bytes, TxKind, B256, U256};
use rand::Rng;
use reth_chainspec::MAINNET;
use reth_primitives::{
constants::MIN_PROTOCOL_BASE_FEE, sign_message, Transaction, TransactionSigned,
};
use reth_primitives::{sign_message, Transaction, TransactionSigned};
/// A generator for transactions for testing purposes.
#[derive(Debug)]

View File

@ -11,7 +11,7 @@ use alloy_consensus::{
constants::{EIP1559_TX_TYPE_ID, EIP2930_TX_TYPE_ID, EIP4844_TX_TYPE_ID, LEGACY_TX_TYPE_ID},
TxEip1559, TxEip2930, TxEip4844, TxLegacy,
};
use alloy_eips::eip2930::AccessList;
use alloy_eips::{eip1559::MIN_PROTOCOL_BASE_FEE, eip2930::AccessList};
use alloy_primitives::{Address, Bytes, ChainId, TxHash, TxKind, B256, U256};
use paste::paste;
use rand::{
@ -19,8 +19,7 @@ use rand::{
prelude::Distribution,
};
use reth_primitives::{
constants::{eip4844::DATA_GAS_PER_BLOB, MIN_PROTOCOL_BASE_FEE},
transaction::TryFromRecoveredTransactionError,
constants::eip4844::DATA_GAS_PER_BLOB, transaction::TryFromRecoveredTransactionError,
BlobTransactionSidecar, BlobTransactionValidationError, PooledTransactionsElementEcRecovered,
Signature, Transaction, TransactionSigned, TransactionSignedEcRecovered, TxType,
};

View File

@ -1,9 +1,8 @@
//! Transaction pool eviction tests.
use alloy_eips::eip1559::ETHEREUM_BLOCK_GAS_LIMIT;
use alloy_eips::eip1559::{ETHEREUM_BLOCK_GAS_LIMIT, MIN_PROTOCOL_BASE_FEE};
use alloy_primitives::{Address, B256};
use rand::distributions::Uniform;
use reth_primitives::constants::MIN_PROTOCOL_BASE_FEE;
use reth_transaction_pool::{
error::PoolErrorKind,
test_utils::{