We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 448ec7d commit f6dec71Copy full SHA for f6dec71
crates/primitives-traits/src/block/body.rs
@@ -67,6 +67,13 @@ pub trait BlockBody:
67
self.transactions_iter().find(|tx| tx.tx_hash() == hash)
68
}
69
70
+ /// Returns true if the block body contains a transaction with the given hash.
71
+ ///
72
+ /// This is a convenience function for `transaction_by_hash().is_some()`
73
+ fn contains_transaction(&self, hash: &B256) -> bool {
74
+ self.transaction_by_hash(hash).is_some()
75
+ }
76
+
77
/// Clones the transactions in the block.
78
///
79
/// This is a convenience function for `transactions().to_vec()`
0 commit comments