feat: validate payload versioned hashes (#4417)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Dan Cline
2023-08-30 17:05:46 -07:00
committed by GitHub
parent 8fff8fa8e9
commit 893f4cf2a2
3 changed files with 87 additions and 8 deletions

View File

@ -161,6 +161,11 @@ impl SealedBlock {
)
}
/// Returns only the blob transactions, if any, from the block body.
pub fn blob_transactions(&self) -> Vec<&TransactionSigned> {
self.body.iter().filter(|tx| tx.is_eip4844()).collect()
}
/// Expensive operation that recovers transaction signer. See [SealedBlockWithSenders].
pub fn senders(&self) -> Option<Vec<Address>> {
TransactionSigned::recover_signers(&self.body, self.body.len())