HomePhabricator

Refactor PSBT signing logic to enforce invariant

Description

Refactor PSBT signing logic to enforce invariant

Summary:
Backport of core PR14588.

This refactor repairs the invariant, [...]. It also simplifies some
other code, and removes redundant parameters from some related
functions.

Note that the bug fixed in the PR is not affecting us, but I kept the
test as it can't hurt.

Also the IsSane() method is kept for easier backports, despite it does
nothing and will be optimized out by the compiler.

Test Plan:

ninja check check-functional

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

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

Details

Provenance
Glenn Willen <gwillen@nerdnet.org>Authored on Oct 26 2018, 22:18
FabienCommitted on Apr 15 2020, 10:51
FabienPushed on Apr 15 2020, 10:51
Reviewer
Restricted Project
Differential Revision
D5715: Refactor PSBT signing logic to enforce invariant
Parents
rABC6ed34f9cc7cc: Factor BroadcastTransaction out of sendrawtransaction
Branches
Unknown
Tags
Unknown