feat: add is eip4844 fn (#4147)

This commit is contained in:
Matthias Seitz
2023-08-10 18:07:44 +02:00
committed by GitHub
parent b8b7ad60ad
commit e43187bf7f
4 changed files with 12 additions and 5 deletions

View File

@@ -7,7 +7,8 @@ use crate::{
use futures_util::{ready, Stream};
use reth_primitives::{
Address, FromRecoveredTransaction, IntoRecoveredTransaction, PeerId, Transaction,
TransactionKind, TransactionSignedEcRecovered, TxHash, EIP1559_TX_TYPE_ID, H256, U256,
TransactionKind, TransactionSignedEcRecovered, TxHash, EIP1559_TX_TYPE_ID, EIP4844_TX_TYPE_ID,
H256, U256,
};
use reth_rlp::Encodable;
use std::{
@@ -554,6 +555,11 @@ pub trait PoolTransaction:
self.tx_type() == EIP1559_TX_TYPE_ID
}
/// Returns true if the transaction is an EIP-4844 transaction.
fn is_eip4844(&self) -> bool {
self.tx_type() == EIP4844_TX_TYPE_ID
}
/// Returns the length of the rlp encoded object
fn encoded_length(&self) -> usize;