mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-08 03:01:12 -04:00
feat: added Body::contains_transaction(&TxHash) (#16715)
This commit is contained in:
@@ -67,6 +67,13 @@ pub trait BlockBody:
|
||||
self.transactions_iter().find(|tx| tx.tx_hash() == hash)
|
||||
}
|
||||
|
||||
/// Returns true if the block body contains a transaction with the given hash.
|
||||
///
|
||||
/// This is a convenience function for `transaction_by_hash().is_some()`
|
||||
fn contains_transaction(&self, hash: &B256) -> bool {
|
||||
self.transaction_by_hash(hash).is_some()
|
||||
}
|
||||
|
||||
/// Clones the transactions in the block.
|
||||
///
|
||||
/// This is a convenience function for `transactions().to_vec()`
|
||||
|
||||
Reference in New Issue
Block a user