psbt: sign without finalizing

We don't always want to finalize after signing, so make it possible to
do that.
This commit is contained in:
Andrew Chow
2021-07-20 21:24:56 -04:00
parent 6a5381a06b
commit a99ed89865
11 changed files with 32 additions and 20 deletions

View File

@ -119,7 +119,9 @@ class PSBTTest(BitcoinTestFramework):
self.nodes[0].walletpassphrase(passphrase="password", timeout=1000000)
# Sign the transaction and send
signed_tx = self.nodes[0].walletprocesspsbt(psbtx)['psbt']
signed_tx = self.nodes[0].walletprocesspsbt(psbt=psbtx, finalize=False)['psbt']
finalized_tx = self.nodes[0].walletprocesspsbt(psbt=psbtx, finalize=True)['psbt']
assert signed_tx != finalized_tx
final_tx = self.nodes[0].finalizepsbt(signed_tx)['hex']
self.nodes[0].sendrawtransaction(final_tx)