aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-08-28 23:01:42 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-08-28 23:11:15 +0200
commit5de338ec725435228fa837849252c2ad3e68a19f (patch)
tree407cca54878c45f2ca329061c437318d0bc9891a /test
parent8e9f85141506870e691ab66d6b37ff94d902ff69 (diff)
parent61fe653bd919cb0533b2b9d6259bc86a4b2975c0 (diff)
downloadbitcoin-5de338ec725435228fa837849252c2ad3e68a19f.tar.xz
Merge #14055: fix walletcreatefundedpsbt deriv paths, add test
61fe653bd919cb0533b2b9d6259bc86a4b2975c0 fix walletcreatefundedpsbt deriv paths, add test (Gregory Sanders) Pull request description: Added the regression in #13968 Tree-SHA512: a31290b57ed80a8486925e562ca5412500d4215a238de7e448f48edfa671c87aebd79ee179a8340b289d9811ae6fa30ef75eefd5f5890fb6285174c5db72ff65
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/rpc_psbt.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py
index f847a01e59..d558de5fe1 100755
--- a/test/functional/rpc_psbt.py
+++ b/test/functional/rpc_psbt.py
@@ -143,17 +143,19 @@ class PSBTTest(BitcoinTestFramework):
# replaceable arg
block_height = self.nodes[0].getblockcount()
unspent = self.nodes[0].listunspent()[0]
- psbtx_info = self.nodes[0].walletcreatefundedpsbt([{"txid":unspent["txid"], "vout":unspent["vout"]}], [{self.nodes[2].getnewaddress():unspent["amount"]+1}], block_height+2, {"replaceable":True})
+ psbtx_info = self.nodes[0].walletcreatefundedpsbt([{"txid":unspent["txid"], "vout":unspent["vout"]}], [{self.nodes[2].getnewaddress():unspent["amount"]+1}], block_height+2, {"replaceable":True}, False)
decoded_psbt = self.nodes[0].decodepsbt(psbtx_info["psbt"])
- for tx_in in decoded_psbt["tx"]["vin"]:
+ for tx_in, psbt_in in zip(decoded_psbt["tx"]["vin"], decoded_psbt["inputs"]):
assert_equal(tx_in["sequence"], MAX_BIP125_RBF_SEQUENCE)
+ assert "bip32_derivs" not in psbt_in
assert_equal(decoded_psbt["tx"]["locktime"], block_height+2)
# Same construction with only locktime set
- psbtx_info = self.nodes[0].walletcreatefundedpsbt([{"txid":unspent["txid"], "vout":unspent["vout"]}], [{self.nodes[2].getnewaddress():unspent["amount"]+1}], block_height)
+ psbtx_info = self.nodes[0].walletcreatefundedpsbt([{"txid":unspent["txid"], "vout":unspent["vout"]}], [{self.nodes[2].getnewaddress():unspent["amount"]+1}], block_height, {}, True)
decoded_psbt = self.nodes[0].decodepsbt(psbtx_info["psbt"])
- for tx_in in decoded_psbt["tx"]["vin"]:
+ for tx_in, psbt_in in zip(decoded_psbt["tx"]["vin"], decoded_psbt["inputs"]):
assert tx_in["sequence"] > MAX_BIP125_RBF_SEQUENCE
+ assert "bip32_derivs" in psbt_in
assert_equal(decoded_psbt["tx"]["locktime"], block_height)
# Same construction without optional arguments