diff options
author | John Newbery <john@johnnewbery.com> | 2019-09-30 16:25:04 -0400 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2019-10-10 11:17:01 -0400 |
commit | a1a07cfe99fc8cee30ba5976dc36b47b1f6532ab (patch) | |
tree | 36a7d2b8821a1dbc2169c0fa21086899a7934550 /src/consensus/tx_check.cpp | |
parent | ceecefe0b0e1595e3397e7523a5749e114304d28 (diff) |
[validation] Fix peer punishment for bad blocks
Because the call to MaybePunishNode() in
PeerLogicValidation::BlockChecked() only previously happened if the
REJECT code was > 0 and < REJECT_INTERNAL, then there are cases were
MaybePunishNode() can get called where it wasn't previously:
- when AcceptBlockHeader() fails with CACHED_INVALID.
- when AcceptBlockHeader() fails with BLOCK_MISSING_PREV.
Note that BlockChecked() cannot fail with an 'internal' reject code. The
only internal reject code was REJECT_HIGHFEE, which was only set in
ATMP.
This change restores the behaviour pre-commit
5d08c9c579ba8cc7b684105c6a08263992b08d52 which did punish nodes that
sent us CACHED_INVALID and BLOCK_MISSING_PREV blocks.
Diffstat (limited to 'src/consensus/tx_check.cpp')
0 files changed, 0 insertions, 0 deletions