/// Update the Mempool based on the received published block.
Update the Mempool based on the received published block.
Update the Mempool based on the received published block .
pub fn process_published_block(&mut self, published_block: Arc<Block>) -> Result<(), MempoolError> {
        trace!(target: LOG_TARGET, "Mempool processing new block: {}", published_block);
        // Move published txs to ReOrgPool and discard double spends
        self.reorg_pool.insert_txs(
            self.unconfirmed_pool
                .remove_published_and_discard_double_spends(&published_block),
        )?;
        // Move txs with valid input UTXOs and expired time-locks to UnconfirmedPool and discard double spends
        self.unconfirmed_pool.insert_txs(
            self.pending_pool
                .remove_unlocked_and_discard_double_spends(&published_block)?,
        )?;
        // Move txs with recently expired time-locks that have input UTXOs that have recently become valid to the
        // UnconfirmedPool
        let (txs, time_locked_txs) = self.orphan_pool.scan_for_and_remove_unorphaned_txs()?;
        self.unconfirmed_pool.insert_txs(txs)?;
        // Move Time-locked txs that have input UTXOs that have recently become valid to PendingPool.
        self.pending_pool.insert_txs(time_locked_txs)?;
        Ok(())
    }
pub fn process_published_block ( & mut self , published_block : Arc < Block > ) -> Result < ( ) , MempoolError > { trace ! ( target LOG_TARGET " " published_block ) ; // Move published txs to ReOrgPool and discard double spends self . reorg_pool . insert_txs ( self . unconfirmed_pool . remove_published_and_discard_double_spends ( & published_block ) , ) ? ; // Move txs with valid input UTXOs and expired time-locks to UnconfirmedPool and discard double spends self . unconfirmed_pool . insert_txs ( self . pending_pool . remove_unlocked_and_discard_double_spends ( & published_block ) ? , ) ? ; // Move txs with recently expired time-locks that have input UTXOs that have recently become valid to the // UnconfirmedPool let ( txs , time_locked_txs ) = self . orphan_pool . scan_for_and_remove_unorphaned_txs ( ) ? ; self . unconfirmed_pool . insert_txs ( txs ) ? ; // Move Time-locked txs that have input UTXOs that have recently become valid to PendingPool. self . pending_pool . insert_txs ( time_locked_txs ) ? ; Ok ( ( ) ) }
Update the Mempool based on the received published block.
Update the Mempool based on the received published block .
&mut self
published_block
Arc<Block>