chore: unify more tx signed fns (#12883)

This commit is contained in:
Matthias Seitz
2024-11-26 17:21:52 +01:00
committed by GitHub
parent 6bba5e6630
commit ebf837e6e8
5 changed files with 9 additions and 16 deletions

View File

@ -21,6 +21,7 @@ use reth_primitives::{
PooledTransactionsElementEcRecovered, SealedHeader, TransactionSigned,
TransactionSignedEcRecovered,
};
use reth_primitives_traits::SignedTransaction;
use reth_storage_api::{errors::provider::ProviderError, BlockReaderIdExt, StateProviderFactory};
use reth_tasks::TaskSpawner;
use std::{
@ -317,7 +318,7 @@ pub async fn maintain_transaction_pool<Client, P, St, Tasks>(
// find all transactions that were mined in the old chain but not in the new chain
let pruned_old_transactions = old_blocks
.transactions_ecrecovered()
.filter(|tx| !new_mined_transactions.contains(tx.hash_ref()))
.filter(|tx| !new_mined_transactions.contains(tx.tx_hash()))
.filter_map(|tx| {
if tx.is_eip4844() {
// reorged blobs no longer include the blob, which is necessary for

View File

@ -23,6 +23,7 @@ use reth_primitives::{
PooledTransactionsElementEcRecovered, SealedBlock, Transaction, TransactionSigned,
TransactionSignedEcRecovered,
};
use reth_primitives_traits::SignedTransaction;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use std::{
@ -1244,7 +1245,7 @@ impl PoolTransaction for EthPooledTransaction {
/// Returns hash of the transaction.
fn hash(&self) -> &TxHash {
self.transaction.hash_ref()
self.transaction.tx_hash()
}
/// Returns the Sender of the transaction.