Page MenuHomePhabricator

Merge #11900: [script] simplify CheckMinimalPush checks, add safety assert
ClosedPublic

Authored by nakihito on Jul 29 2019, 19:08.

Details

Summary

0749808a7 CheckMinimalPush comments are prescriptive (Gregory Sanders)
176db6147 simplify CheckMinimalPush checks, add safety assert (Gregory Sanders)

Pull request description:

the two conditions could simply never be hit as `true`, as those opcodes have a push payload of size 0 in `data`.

Added the assert for clarity for future readers(matching the gating in the interpreter) and safety for future use.

This effects policy only.

Tree-SHA512: f49028a1d5e907ef697b9bf5104c81ba8f6a331dbe5d60d8d8515ac17d2d6bfdc9dcc856a7e3dbd54814871b7d0695584d28da6553e2d9d7715430223f0b3690

Backport of Core PR11900
https://github.com/bitcoin/bitcoin/pull/11900/

Test Plan
make check

Diff Detail

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

Event Timeline

Owners added a reviewer: Restricted Owners Package.Jul 29 2019, 19:08

else if statements changed to independent if statements here: https://reviews.bitcoinabc.org/D341#change-9hDdQ9uC4uT6

markblundeberg added a subscriber: markblundeberg.

Hmm, I don't get why there is the 'should' / 'must' distinction here, but yeah 👍 I wondered why it had been written that way.

This revision is now accepted and ready to land.Jul 29 2019, 21:20