fn new_block(&mut self, block: &Block) -> Vec<Signature> {
        let signatures = self.collect_pending_finality_signatures(block.hash());
        let mut block_signatures = BlockSignatures::new(*block.hash(), block.header().era_id());
        for sig in signatures.iter() {
            block_signatures.insert_proof(sig.public_key(), sig.signature());
        }
        // Cache the signatures as we expect more finality signatures for the new block to
        // arrive soon.
        // If `signatures` was empty, it will serve as a flag that the `block` is already
        // finalized/known and any incoming signatures should be accepted (given they're
        // from a bonded validator and valid).
        self.cache_signatures(block_signatures);
        signatures
    }
// New linear chain block received. Collect any pending finality signatures that
// were waiting for that block.
New linear chain block received. Collect any pending finality signatures that
were waiting for that block.
New linear chain block received . Collect any pending finality signatures that were waiting for that block .
fn new_block(&mut self, block: &Block) -> Vec<Signature> {
        let signatures = self.collect_pending_finality_signatures(block.hash());
        let mut block_signatures = BlockSignatures::new(*block.hash(), block.header().era_id());
        for sig in signatures.iter() {
            block_signatures.insert_proof(sig.public_key(), sig.signature());
        }
        // Cache the signatures as we expect more finality signatures for the new block to
        // arrive soon.
        // If `signatures` was empty, it will serve as a flag that the `block` is already
        // finalized/known and any incoming signatures should be accepted (given they're
        // from a bonded validator and valid).
        self.cache_signatures(block_signatures);
        signatures
    }
fn new_block ( & mut self , block : & Block ) -> Vec < Signature > { let signatures = self . collect_pending_finality_signatures ( block . hash ( ) ) ; let mut block_signatures = BlockSignatures :: new ( * block . hash ( ) , block . header ( ) . era_id ( ) ) ; for sig in signatures . iter ( ) { block_signatures . insert_proof ( sig . public_key ( ) , sig . signature ( ) ) ; } // Cache the signatures as we expect more finality signatures for the new block to // arrive soon. // If `signatures` was empty, it will serve as a flag that the `block` is already // finalized/known and any incoming signatures should be accepted (given they're // from a bonded validator and valid). self . cache_signatures ( block_signatures ) ; signatures }
New linear chain block received.
New linear chain block received .
&mut self
block
&Block
&mut self
block
&Block