923 | @@ -923,6 +924,29 @@ def test_psbt_input_keys(psbt_input, keys):
924 | assert "final_scriptwitness" not in joined_decoded['inputs'][3]
925 | assert "final_scriptSig" not in joined_decoded['inputs'][3]
926 |
927 | + # Check that joinpsbts ignores locktime when all inputs use SEQUENCE_FINAL
928 | + addr5 = self.nodes[1].getnewaddress("", "bech32m")
929 | + utxo5 = self.create_outpoints(self.nodes[0], outputs=[{addr5: 5}])[0]
930 | + self.generate(self.nodes[0], 6)
931 | + vin = [{"txid": utxo4["txid"], "vout": utxo4["vout"], "sequence": SEQUENCE_FINAL}]
932 | + psbt_50 = self.nodes[1].createpsbt(vin, {self.nodes[0].getnewaddress():Decimal('4.999')}, locktime=50)
Even if the sequence was valid, the psbt with locktime= 50 would be ignore as the maximum is 200. I think it is better to put a higher locktime than 200 to show the locktime is ignored
psbt_250 = self.nodes[1].createpsbt(vin, {self.nodes[0].getnewaddress():Decimal('4.999')}, locktime=250)