lbrycrd/src/rpc
Pieter Wuille b30c62d4b9
Merge #14588: Refactor PSBT signing logic to enforce invariant and fix signing bug
e13fea975d Add regression test for PSBT signing bug #14473 (Glenn Willen)
565500508a Refactor PSBTInput signing to enforce invariant (Glenn Willen)
0f5bda2bd9 Simplify arguments to SignPSBTInput (Glenn Willen)
53e6fffb8f Add bool PSBTInputSigned (Glenn Willen)
65166d4cf8 New PartiallySignedTransaction constructor from CTransction (Glenn Willen)
4f3f5cb4b1 Remove redundant txConst parameter to FillPSBT (Glenn Willen)
fe5d22bc67 More concise conversion of CDataStream to string (Glenn Willen)

Pull request description:

  As discussed in the comments on #14473, I think that bug was caused primarily by failure to adhere to the invariant that a PSBTInput always has exactly one of the two utxo fields present -- an invariant that is already enforced by PSBTInput::IsSane, but which we were temporarily suspending during signing.

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

  fixes #14473

Tree-SHA512: cbad3428175e30f9b7bac3f600668dd1a8f9acde16b915d27a940a2fa6d5149d4fbe236d5808fd590fb20a032274c99e8cac34bef17f79a53fdf69a5948c0fd0
2018-11-09 19:43:09 -08:00
..
blockchain.cpp scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
blockchain.h doc: correct GetDifficulty doc after #13288 2018-09-03 09:35:41 +08:00
client.cpp scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
client.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
mining.cpp scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
mining.h scripted-diff: Replace #include "" with #include <> (ryanofsky) 2017-11-16 08:23:01 +13:00
misc.cpp scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
net.cpp scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
protocol.cpp scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
protocol.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
rawtransaction.cpp Merge #14588: Refactor PSBT signing logic to enforce invariant and fix signing bug 2018-11-09 19:43:09 -08:00
rawtransaction.h Pass chain and client variables where needed 2018-11-06 11:44:40 -04:00
register.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
server.cpp scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
server.h convert C-style (void) parameter lists to C++ style () 2018-09-13 10:36:41 -07:00
util.cpp Pass chain and client variables where needed 2018-11-06 11:44:40 -04:00
util.h Pass chain and client variables where needed 2018-11-06 11:44:40 -04:00