core/network: Log when ignoring genesis block announcement (#3078)

Instead of logging the fact that a generic invalid block announcement is
ignored, log that the given block is the genesis block.
This commit is contained in:
Max Inden
2019-07-10 11:12:36 +02:00
committed by André Silva
parent 01060df459
commit c2491ed20b
+1 -1
View File
@@ -797,7 +797,7 @@ impl<B: BlockT> ChainSync<B> {
let number = *header.number();
debug!(target: "sync", "Received block announcement with number {:?}", number);
if number.is_zero() {
warn!(target: "sync", "Ignored invalid block announcement from {}: {}", who, hash);
warn!(target: "sync", "Ignored genesis block (#0) announcement from {}: {}", who, hash);
return false;
}
let parent_status = block_status(&*protocol.client(), &self.queue_blocks, header.parent_hash().clone()).ok()