mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-08 19:53:27 +01:00
fix converttopsbt permitsigdata arg, add basic test
This commit is contained in:
@@ -107,6 +107,9 @@ class PSBTTest(BitcoinTestFramework):
|
||||
# Make sure that a psbt with signatures cannot be converted
|
||||
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'], False)
|
||||
# Unless we allow it to convert and strip signatures
|
||||
self.nodes[0].converttopsbt(signedtx['hex'], True)
|
||||
|
||||
# Explicitly allow converting non-empty txs
|
||||
new_psbt = self.nodes[0].converttopsbt(rawtx['hex'])
|
||||
|
||||
Reference in New Issue
Block a user