fn purge_old_transactions(&mut self, now: TimeStamp) {
        while let Some(TransactionInfo {
            block_timestamp,
            transaction_hash,
        }) = self.transactions_by_height.front()
        {
            if *block_timestamp + self.transaction_window > now {
                // Stop at a sufficiently recent block.
                break;
            }
            let removed = self.transactions_by_hash.remove(&transaction_hash);
            assert!(removed.is_some());

            // After 24 hours we don't need to store notification state because it isn't
            // accessible. We don't inspect the result because we don't care whether a
            // notification at this block height was made or not.
            match removed {
                Some(bh) => self.blocks_notified.remove(bh),
                None => None,
            };
            self.transactions_by_height.pop_front();
        }
    }
/// Remove transactions older than `transaction_window`.
Remove transactions older than `transaction_window`.
Remove transactions older than ` transaction_window ` .
fn purge_old_transactions(&mut self, now: TimeStamp) {
        while let Some(TransactionInfo {
            block_timestamp,
            transaction_hash,
        }) = self.transactions_by_height.front()
        {
            if *block_timestamp + self.transaction_window > now {
                // Stop at a sufficiently recent block.
                break;
            }
            let removed = self.transactions_by_hash.remove(&transaction_hash);
            assert!(removed.is_some());
            // After 24 hours we don't need to store notification state because it isn't
            // accessible. We don't inspect the result because we don't care whether a
            // notification at this block height was made or not.
            match removed {
                Some(bh) => self.blocks_notified.remove(bh),
                None => None,
            };
            self.transactions_by_height.pop_front();
        }
    }
fn purge_old_transactions ( & mut self , now : TimeStamp ) { while let Some ( TransactionInfo { block_timestamp , transaction_hash , } ) = self . transactions_by_height . front ( ) { if * block_timestamp + self . transaction_window > now { // Stop at a sufficiently recent block. break ; } let removed = self . transactions_by_hash . remove ( & transaction_hash ) ; assert ! ( removed is_some ( ) ) ; // After 24 hours we don't need to store notification state because it isn't // accessible. We don't inspect the result because we don't care whether a // notification at this block height was made or not. match removed { Some ( bh ) => self . blocks_notified . remove ( bh ) , None => None , } ; self . transactions_by_height . pop_front ( ) ; } }
Remove transactions older than `transaction_window`.
Remove transactions older than ` transaction_window ` .
&mut self
now
TimeStamp
&mut self
now
TimeStamp