Skip to main content

remember_rejected_early_block

Function remember_rejected_early_block 

Source
pub(crate) fn remember_rejected_early_block(
    rejected: &mut IndexSet<Hash>,
    hash: Hash,
)
Expand description

Remembers hash, the hash of a block from a peer that negotiated compact block relay, which passed the checks that authenticate it for early relay and then failed later validation, in rejected, a block downloader’s list of those hashes, oldest first.

The block’s hash commits to its transactions and their authorizing data, so the downloader ignores the hash instead of verifying the same invalid block again. Forgets the oldest hash once there are more than MAX_REJECTED_EARLY_BLOCKS.