Page MenuHomePhabricator

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

Authored by majcosta on Oct 7 2020, 18:15.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

majcosta requested review of this revision.Oct 7 2020, 18:15

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

This revision is now accepted and ready to land.Oct 7 2020, 18:33