Implement joinpsbts RPC and tests

Adds a joinpsbts RPC which combines multiple distinct PSBTs into
one PSBT.
This commit is contained in:
Andrew Chow
2018-07-20 18:24:16 -07:00
parent 7344a7b998
commit 08f749c914
5 changed files with 115 additions and 0 deletions

View File

@@ -389,6 +389,8 @@ struct PartiallySignedTransaction
* same actual Bitcoin transaction.) Returns true if the merge succeeded, false otherwise. */
NODISCARD bool Merge(const PartiallySignedTransaction& psbt);
bool IsSane() const;
bool AddInput(const CTxIn& txin, PSBTInput& psbtin);
bool AddOutput(const CTxOut& txout, const PSBTOutput& psbtout);
PartiallySignedTransaction() {}
PartiallySignedTransaction(const PartiallySignedTransaction& psbt_in) : tx(psbt_in.tx), inputs(psbt_in.inputs), outputs(psbt_in.outputs), unknown(psbt_in.unknown) {}
explicit PartiallySignedTransaction(const CMutableTransaction& tx);