Don't penalize parent nodes as misbehaving for relaying a new block at the tip while we are downloading

#264 Declined
Repository
Branch
fix_download_misbehaving
Repository
Branch
2.1.1-RC
Author
  1. Woodstock Merkle
Reviewers
Description

Use the IsInitialBlockDownload() function

I surmise a better fix would be to improve ProcessBlock() and "state." to be more granular as to the reason why the block is invalid (i.e.: can't get transactions)

Comments (2)

  1. Michael Witrant

    It's somewhat already granular by increasing by 1. Most checks are clearly identified as abuse and immediately add 100 which is the default ban score.

    The PR looks good, but I would not change the log.

    The downside is that someone could now easily flood a downloading node with invalid blocks. A proper fix would be to make the other nodes not send these blocks at all. It would be nice if they knew at which height the other nodes are, so that they could know whether they can verify a specific block. But in the meantime this fix is good.