remove old work-around for a bug in version 1.1.4 and earlier #17339
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose:
there was a bug in early version of the full node where an invalid block would sometimes be forwarded to peers (only to be classified invalid later). This was a work-around to not disconnect clients sending you an invalid block (given it was the right kind of invalid).
This was fixed a long time ago now, and we (probably) don't need this work-around anymore.
Current Behavior:
If a peer sends an unfinished block that fails with
COIN_AMOUNT_NEGATIVE
, we discard the block but forgive the peer, and stay connected to it.New Behavior:
If a peer sends an unfinished block that's invalid, we always disconnect the peer.