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)
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.
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.
I cleaned up (reverted) the printf.