Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent pegin double spends from entering the mempool
This bug got introduced with the 0.17 rebase. In 0.14.1 the double pegin claim check was done in the beginning of the validation logic, where the coins view was the actual UTXO set. In 0.17, Core moved several checks because the intermediate method CheckInputs was removed and some logic moved to tx_verify.cpp, where we also put the pegin check. In the mempool acceptance check, however (as opposed to the ConnectBlock check), CheckTxInputs is called with only a partial UTXO view for optimization reasons. This commit adds an extra pegin check in the beginning of the mempool code where we have a full UTXO view.
- Loading branch information