pub fn make_nil_block(parent_block: &Block<T>, round: Round, quorum_cert: QuorumCert) -> Self {
        checked_precondition_eq!(quorum_cert.certified_block_id(), parent_block.id());
        checked_precondition!(round > parent_block.round());

        // This precondition guards the addition overflow caused by using
        // parent_block.height() + 1 in the construction of BlockSerializer.
        checked_precondition!(parent_block.height() < std::u64::MAX);

        let payload = T::default();
        // We want all the NIL blocks to agree on the timestamps even though they're generated
        // independently by different validators, hence we're using the timestamp of a parent + 1.
        // The reason for artificially adding 1 usec is to support execution state synchronization,
        // which doesn't have any other way of determining the order of ledger infos rather than
        // comparing their timestamps.
        let timestamp_usecs = parent_block.timestamp_usecs + 1;
        let block_serializer = BlockSerializer {
            parent_id: parent_block.id(),
            payload: &payload,
            round,
            height: parent_block.height() + 1,
            timestamp_usecs,
            quorum_cert: &quorum_cert,
            // the author here doesn't really matter for as long as all the NIL Blocks are hashing
            // the same value, hence use the special genesis author for hashing.
            author: None,
        };

        let id = block_serializer.hash();

        Block {
            id,
            payload,
            parent_id: parent_block.id(),
            round,
            height: parent_block.height() + 1,
            timestamp_usecs,
            quorum_cert,
            block_source: BlockSource::NilBlock,
        }
    }
/// The NIL blocks are special: they're not carrying any real payload and are generated
/// independently by different validators just to fill in the round with some QC.
The NIL blocks are special: they're not carrying any real payload and are generated
independently by different validators just to fill in the round with some QC.
The NIL blocks are special : they ' re not carrying any real payload and are generated independently by different validators just to fill in the round with some QC .
pub fn make_nil_block(parent_block: &Block<T>, round: Round, quorum_cert: QuorumCert) -> Self {
        checked_precondition_eq!(quorum_cert.certified_block_id(), parent_block.id());
        checked_precondition!(round > parent_block.round());
        // This precondition guards the addition overflow caused by using
        // parent_block.height() + 1 in the construction of BlockSerializer.
        checked_precondition!(parent_block.height() < std::u64::MAX);
        let payload = T::default();
        // We want all the NIL blocks to agree on the timestamps even though they're generated
        // independently by different validators, hence we're using the timestamp of a parent + 1.
        // The reason for artificially adding 1 usec is to support execution state synchronization,
        // which doesn't have any other way of determining the order of ledger infos rather than
        // comparing their timestamps.
        let timestamp_usecs = parent_block.timestamp_usecs + 1;
        let block_serializer = BlockSerializer {
            parent_id: parent_block.id(),
            payload: &payload,
            round,
            height: parent_block.height() + 1,
            timestamp_usecs,
            quorum_cert: &quorum_cert,
            // the author here doesn't really matter for as long as all the NIL Blocks are hashing
            // the same value, hence use the special genesis author for hashing.
            author: None,
        };
        let id = block_serializer.hash();
        Block {
            id,
            payload,
            parent_id: parent_block.id(),
            round,
            height: parent_block.height() + 1,
            timestamp_usecs,
            quorum_cert,
            block_source: BlockSource::NilBlock,
        }
    }
pub fn make_nil_block ( parent_block : & Block < T > , round : Round , quorum_cert : QuorumCert ) -> Self { checked_precondition_eq ! ( quorum_cert certified_block_id ( ) parent_block id ( ) ) ; checked_precondition ! ( round parent_block round ( ) ) ; // This precondition guards the addition overflow caused by using // parent_block.height() + 1 in the construction of BlockSerializer. checked_precondition ! ( parent_block height ( ) std u64 MAX ) ; let payload = T :: default ( ) ; // We want all the NIL blocks to agree on the timestamps even though they're generated // independently by different validators, hence we're using the timestamp of a parent + 1. // The reason for artificially adding 1 usec is to support execution state synchronization, // which doesn't have any other way of determining the order of ledger infos rather than // comparing their timestamps. let timestamp_usecs = parent_block . timestamp_usecs + 1 ; let block_serializer = BlockSerializer { parent_id : parent_block . id ( ) , payload : & payload , round , height : parent_block . height ( ) + 1 , timestamp_usecs , quorum_cert : & quorum_cert , // the author here doesn't really matter for as long as all the NIL Blocks are hashing // the same value, hence use the special genesis author for hashing. author : None , } ; let id = block_serializer . hash ( ) ; Block { id , payload , parent_id : parent_block . id ( ) , round , height : parent_block . height ( ) + 1 , timestamp_usecs , quorum_cert , block_source : BlockSource :: NilBlock , } }
The NIL blocks are special: they're not carrying any real payload and are generated
independently by different validators just to fill in the round with some QC.
The NIL blocks are special : they ' re not carrying any real payload and are generated independently by different validators just to fill in the round with some QC .
parent_block
&Block<T>
round
Round
quorum_cert
QuorumCert
parent_block
&Block<T>
round
Round
quorum_cert
QuorumCert