HomePhabricator

[backport#16128] Delete error-prone CScript constructor only used with…

Description

[backport#16128] Delete error-prone CScript constructor only used with FindAndDelete

Summary:
e1a55690e66ca962179bc8170695b92af8a3caa8 Delete error-prone CScript constructor (Gregory Sanders)

Pull request description:

The behavior of this constructor is not the expected behavior compared to the other constructors which directly interpret the vector as a CScript, rather than serialize it into a new CScript. It has only four uses in the entire codebase. Delete this constructor and replace its four uses with the more clear serialization construction.

ACKs for top commit:

Empact:
  ACK https://github.com/bitcoin/bitcoin/pull/16128/commits/e1a55690e66ca962179bc8170695b92af8a3caa8
sipa:
  Concept and code review ACK e1a55690e66ca962179bc8170695b92af8a3caa8, but I'd like to make sure we have tests covering the FindAndDelete usage.

Backport of Core PR16128

Test Plan:

ninja all check check-functional

Reviewers: deadalnix, #bitcoin_abc

Reviewed By: deadalnix, #bitcoin_abc

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

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Jul 8 2019, 18:29
majcostaCommitted on Oct 7 2020, 19:02
majcostaPushed on Oct 7 2020, 19:02
Reviewer
Restricted Project
Differential Revision
D7805: [backport#16128] Delete error-prone CScript constructor only used with FindAndDelete
Parents
rABC7cec11d3ed10: [backport#17889] wallet: Improve CWallet:MarkDestinationsDirty
Branches
Unknown
Tags
Unknown