@@ -192,12 +192,20 @@ def run_test(self):
192
192
psbt_orig = self .nodes [0 ].createpsbt ([{"txid" :txid1 , "vout" :vout1 }, {"txid" :txid2 , "vout" :vout2 }], {self .nodes [0 ].getnewaddress ():25.999 })
193
193
194
194
# Update psbts, should only have data for one input and not the other
195
- psbt1 = self .nodes [1 ].walletprocesspsbt (psbt_orig )['psbt' ]
195
+ psbt1 = self .nodes [1 ].walletprocesspsbt (psbt_orig , False , "ALL" )['psbt' ]
196
196
psbt1_decoded = self .nodes [0 ].decodepsbt (psbt1 )
197
197
assert psbt1_decoded ['inputs' ][0 ] and not psbt1_decoded ['inputs' ][1 ]
198
- psbt2 = self .nodes [2 ].walletprocesspsbt (psbt_orig )['psbt' ]
198
+ # Check that BIP32 path was added
199
+ assert "bip32_derivs" in psbt1_decoded ['inputs' ][0 ]
200
+ psbt2 = self .nodes [2 ].walletprocesspsbt (psbt_orig , False , "ALL" , False )['psbt' ]
199
201
psbt2_decoded = self .nodes [0 ].decodepsbt (psbt2 )
200
202
assert not psbt2_decoded ['inputs' ][0 ] and psbt2_decoded ['inputs' ][1 ]
203
+ # Check that BIP32 paths were not added
204
+ assert "bip32_derivs" not in psbt2_decoded ['inputs' ][1 ]
205
+
206
+ # Sign PSBTs (workaround issue #18039)
207
+ psbt1 = self .nodes [1 ].walletprocesspsbt (psbt_orig )['psbt' ]
208
+ psbt2 = self .nodes [2 ].walletprocesspsbt (psbt_orig )['psbt' ]
201
209
202
210
# Combine, finalize, and send the psbts
203
211
combined = self .nodes [0 ].combinepsbt ([psbt1 , psbt2 ])
@@ -230,16 +238,18 @@ def run_test(self):
230
238
# Same construction without optional arguments
231
239
psbtx_info = self .nodes [0 ].walletcreatefundedpsbt ([{"txid" :unspent ["txid" ], "vout" :unspent ["vout" ]}], [{self .nodes [2 ].getnewaddress ():unspent ["amount" ]+ 1 }])
232
240
decoded_psbt = self .nodes [0 ].decodepsbt (psbtx_info ["psbt" ])
233
- for tx_in in decoded_psbt ["tx" ]["vin" ]:
241
+ for tx_in , psbt_in in zip ( decoded_psbt ["tx" ]["vin" ], decoded_psbt [ "inputs" ]) :
234
242
assert_equal (tx_in ["sequence" ], MAX_BIP125_RBF_SEQUENCE )
243
+ assert "bip32_derivs" in psbt_in
235
244
assert_equal (decoded_psbt ["tx" ]["locktime" ], 0 )
236
245
237
246
# Same construction without optional arguments, for a node with -walletrbf=0
238
247
unspent1 = self .nodes [1 ].listunspent ()[0 ]
239
248
psbtx_info = self .nodes [1 ].walletcreatefundedpsbt ([{"txid" :unspent1 ["txid" ], "vout" :unspent1 ["vout" ]}], [{self .nodes [2 ].getnewaddress ():unspent1 ["amount" ]+ 1 }], block_height )
240
249
decoded_psbt = self .nodes [1 ].decodepsbt (psbtx_info ["psbt" ])
241
- for tx_in in decoded_psbt ["tx" ]["vin" ]:
250
+ for tx_in , psbt_in in zip ( decoded_psbt ["tx" ]["vin" ], decoded_psbt [ "inputs" ]) :
242
251
assert_greater_than (tx_in ["sequence" ], MAX_BIP125_RBF_SEQUENCE )
252
+ assert "bip32_derivs" in psbt_in
243
253
244
254
# Make sure change address wallet does not have P2SH innerscript access to results in success
245
255
# when attempting BnB coin selection
0 commit comments