HomePhabricator

[backport#17080] consensus: Explain why fCheckDuplicateInputs can not be…

Description

[backport#17080] consensus: Explain why fCheckDuplicateInputs can not be skipped and remove it

Summary:
fa928134075220254a15107c1d9702f4e66271f8 consensus: Explain why fCheckDuplicateInputs can not be skipped and remove it (MarcoFalke)

Pull request description:

As a follow up to CVE-2018-17144, this removes the unused `fCheckDuplicateInputs` parameter and explains why the test can not be disabled. Apart from protecting against a dumb accident in the future, this should document the logic in the code. There is a technical write-up that explains how the underlying coins database behaves if this test is skipped: https://bitcoincore.org/en/2018/09/20/notice/#technical-details. However, it does not explicitly mention why the test can not be skipped. I hope my code comment does that.

Backport of Core PR17080

Test Plan:

read the comment

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D6882

Details

Provenance
Wladimir J. van der Laan <laanwj@protonmail.com>Authored on Oct 25 2019, 11:46
majcostaCommitted on Jul 9 2020, 21:49
majcostaPushed on Jul 9 2020, 21:49
Reviewer
Restricted Project
Differential Revision
D6882: [backport#17080] consensus: Explain why fCheckDuplicateInputs can not be skipped and remove it
Parents
rABC581b5807dd97: [Automated] Update manpages
Branches
Unknown
Tags
Unknown