fn log_block_with_replay(&self, sender: I, block: &ValidatingBlock) {
        let mut deploy_counts = BTreeMap::new();
        for dt_hash in block.deploys_and_transfers_iter() {
            *deploy_counts.entry(dt_hash).or_default() += 1;
        }
        let duplicates = deploy_counts
            .into_iter()
            .filter_map(|(dt_hash, count): (DeployOrTransferHash, usize)| {
                (count > 1).then(|| format!("{} * {}", count, dt_hash))
            })
            .join(", ");
        info!(
            peer_id=?sender, %duplicates,
            "received invalid block containing duplicated deploys"
        );
    }
/// Prints a log message about an invalid block with duplicated deploys.
Prints a log message about an invalid block with duplicated deploys.
Prints a log message about an invalid block with duplicated deploys .
fn log_block_with_replay(&self, sender: I, block: &ValidatingBlock) {
        let mut deploy_counts = BTreeMap::new();
        for dt_hash in block.deploys_and_transfers_iter() {
            *deploy_counts.entry(dt_hash).or_default() += 1;
        }
        let duplicates = deploy_counts
            .into_iter()
            .filter_map(|(dt_hash, count): (DeployOrTransferHash, usize)| {
                (count > 1).then(|| format!("{} * {}", count, dt_hash))
            })
            .join(", ");
        info!(
            peer_id=?sender, %duplicates,
            "received invalid block containing duplicated deploys"
        );
    }
fn log_block_with_replay ( & self , sender : I , block : & ValidatingBlock ) { let mut deploy_counts = BTreeMap :: new ( ) ; for dt_hash in block . deploys_and_transfers_iter ( ) { * deploy_counts . entry ( dt_hash ) . or_default ( ) += 1 ; } let duplicates = deploy_counts . into_iter ( ) . filter_map ( | ( dt_hash , count ) : ( DeployOrTransferHash , usize ) | { ( count > 1 ) . then ( | | format ! ( " " count dt_hash ) ) } ) . join ( " " ) ; info ! ( peer_id sender duplicates " " ) ; }
Prints a log message about an invalid block with duplicated deploys.
Prints a log message about an invalid block with duplicated deploys .
&self
sender
I
block
&ValidatingBlock
&self
sender
I
block
&ValidatingBlock