+
+ fn filter_block<'a>(&self, block: &'a Block) -> (Vec<&'a Transaction>, Vec<u32>) {
+ let mut matched = Vec::new();
+ let mut matched_index = Vec::new();
+ {
+ let watched = self.watched.lock().unwrap();
+ for (index, transaction) in block.txdata.iter().enumerate() {
+ if self.does_match_tx_unguarded(transaction, &watched) {
+ matched.push(transaction);
+ matched_index.push(index as u32);
+ }
+ }
+ }
+ (matched, matched_index)
+ }
+
+ fn reentered(&self) -> usize {
+ self.reentered.load(Ordering::Relaxed)
+ }