mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: replace TransactionSigned struct inits with new functions (#12779)
This commit is contained in:
@ -407,7 +407,7 @@ impl<Provider, Pool, Network, EvmConfig> EthApiInner<Provider, Pool, Network, Ev
|
||||
mod tests {
|
||||
use alloy_consensus::Header;
|
||||
use alloy_eips::BlockNumberOrTag;
|
||||
use alloy_primitives::{B256, U64};
|
||||
use alloy_primitives::{PrimitiveSignature as Signature, B256, U64};
|
||||
use alloy_rpc_types::FeeHistory;
|
||||
use jsonrpsee_types::error::INVALID_PARAMS_CODE;
|
||||
use reth_chainspec::{BaseFeeParams, ChainSpec, EthChainSpec};
|
||||
@ -504,23 +504,21 @@ mod tests {
|
||||
let random_fee: u128 = rng.gen();
|
||||
|
||||
if let Some(base_fee_per_gas) = header.base_fee_per_gas {
|
||||
let transaction = TransactionSigned {
|
||||
transaction: reth_primitives::Transaction::Eip1559(
|
||||
alloy_consensus::TxEip1559 {
|
||||
max_priority_fee_per_gas: random_fee,
|
||||
max_fee_per_gas: random_fee + base_fee_per_gas as u128,
|
||||
..Default::default()
|
||||
},
|
||||
),
|
||||
..Default::default()
|
||||
};
|
||||
let transaction = TransactionSigned::new_unhashed(
|
||||
reth_primitives::Transaction::Eip1559(alloy_consensus::TxEip1559 {
|
||||
max_priority_fee_per_gas: random_fee,
|
||||
max_fee_per_gas: random_fee + base_fee_per_gas as u128,
|
||||
..Default::default()
|
||||
}),
|
||||
Signature::test_signature(),
|
||||
);
|
||||
|
||||
transactions.push(transaction);
|
||||
} else {
|
||||
let transaction = TransactionSigned {
|
||||
transaction: reth_primitives::Transaction::Legacy(Default::default()),
|
||||
..Default::default()
|
||||
};
|
||||
let transaction = TransactionSigned::new_unhashed(
|
||||
reth_primitives::Transaction::Legacy(Default::default()),
|
||||
Signature::test_signature(),
|
||||
);
|
||||
|
||||
transactions.push(transaction);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user