|
|
@ -146,6 +146,9 @@ class PSBTTest(BitcoinTestFramework):
|
|
|
|
# Make sure that a psbt with signatures cannot be converted
|
|
|
|
# Make sure that a psbt with signatures cannot be converted
|
|
|
|
signedtx = self.nodes[0].signrawtransactionwithwallet(rawtx['hex'])
|
|
|
|
signedtx = self.nodes[0].signrawtransactionwithwallet(rawtx['hex'])
|
|
|
|
assert_raises_rpc_error(-22, "TX decode failed", self.nodes[0].converttopsbt, signedtx['hex'])
|
|
|
|
assert_raises_rpc_error(-22, "TX decode failed", self.nodes[0].converttopsbt, signedtx['hex'])
|
|
|
|
|
|
|
|
assert_raises_rpc_error(-22, "TX decode failed", self.nodes[0].converttopsbt, signedtx['hex'], False)
|
|
|
|
|
|
|
|
# Unless we allow it to convert and strip signatures
|
|
|
|
|
|
|
|
self.nodes[0].converttopsbt(signedtx['hex'], True)
|
|
|
|
|
|
|
|
|
|
|
|
# Explicilty allow converting non-empty txs
|
|
|
|
# Explicilty allow converting non-empty txs
|
|
|
|
new_psbt = self.nodes[0].converttopsbt(rawtx['hex'])
|
|
|
|
new_psbt = self.nodes[0].converttopsbt(rawtx['hex'])
|
|
|
|