mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
chore: add encodable to pooled recovered (#12866)
This commit is contained in:
@ -739,6 +739,24 @@ impl TryFrom<TransactionSignedEcRecovered> for PooledTransactionsElementEcRecove
|
||||
}
|
||||
}
|
||||
|
||||
impl Encodable2718 for PooledTransactionsElementEcRecovered {
|
||||
fn type_flag(&self) -> Option<u8> {
|
||||
self.transaction.type_flag()
|
||||
}
|
||||
|
||||
fn encode_2718_len(&self) -> usize {
|
||||
self.transaction.encode_2718_len()
|
||||
}
|
||||
|
||||
fn encode_2718(&self, out: &mut dyn alloy_rlp::BufMut) {
|
||||
self.transaction.encode_2718(out)
|
||||
}
|
||||
|
||||
fn trie_hash(&self) -> B256 {
|
||||
self.transaction.trie_hash()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
@ -947,7 +947,7 @@ pub trait PoolTransaction: fmt::Debug + Send + Sync + Clone {
|
||||
type Consensus: From<Self> + TryInto<Self, Error = Self::TryFromConsensusError>;
|
||||
|
||||
/// Associated type representing the recovered pooled variant of the transaction.
|
||||
type Pooled: Into<Self>;
|
||||
type Pooled: Encodable2718 + Into<Self>;
|
||||
|
||||
/// Define a method to convert from the `Consensus` type to `Self`
|
||||
fn try_from_consensus(tx: Self::Consensus) -> Result<Self, Self::TryFromConsensusError> {
|
||||
|
||||
Reference in New Issue
Block a user