Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dsproof: When an orphan is claimed, clear the nodeId
Summary --- This fixes an issue described in Bitcoin-ABC#311 where a claimed dsproof orphan could lead to a situation where the peer that told you about the proof ends up being erroneously punished with a misbehavior score of +1. The soluton is to clear the dsproof Entry "nodeId" back to -1 when we accept a proof and associate it with a real mempool txn. At this point tracking the nodeId (which is only used for banning) is no longer needed and it should be cleared to prevent banning later when the dsproof completes its lifecycle. Ratonale: if a proof was ever accepeted for any reason, banning should become impossible in the future. Note: The normal lifecycle of a dsproof when its txn confirms is to always become an orphan first (so that it cna be kept around in case of reorg), before being deleted by the cleaner task after 90 seconds. Test Plan --- `ninja all check-all`
- Loading branch information