From fb47a15ff17b734e6dbfb0f172de0bda71ee772d Mon Sep 17 00:00:00 2001 From: Ken Sedgwick Date: Wed, 22 Nov 2023 16:23:29 -0800 Subject: [PATCH] tests: Fix test_sign_and_send_psbt wrt VLS signatures --- tests/test_wallet.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_wallet.py b/tests/test_wallet.py index 9c563d9b2cd3..aac20e8fd17a 100644 --- a/tests/test_wallet.py +++ b/tests/test_wallet.py @@ -859,7 +859,6 @@ def test_psbt_version(node_factory, bitcoind, chainparams): l1.rpc.setpsbtversion(v2_funding, i) -@unittest.skipIf(os.getenv('SUBDAEMON').startswith('hsmd:remote_hsmd') and os.getenv('VLS_PERMISSIVE') != '1', "validate_payments: unbalanced payments on channel") @unittest.skipIf(TEST_NETWORK == 'liquid-regtest', 'Core/Elements need joinpsbt support for v2') def test_sign_and_send_psbt(node_factory, bitcoind, chainparams): """ @@ -1007,7 +1006,12 @@ def test_sign_and_send_psbt(node_factory, bitcoind, chainparams): # But it can sign all the valid ones at once. half_signed_psbt = l1.rpc.signpsbt(joint_psbt, signonly=sign_success)['signed_psbt'] for s in sign_success: - assert bitcoind.rpc.decodepsbt(half_signed_psbt)['inputs'][s]['partial_signatures'] is not None + decoded_input = bitcoind.rpc.decodepsbt(half_signed_psbt)['inputs'][s] + if 'partial_signatures' in decoded_input: + assert decoded_input['partial_signatures'] is not None + else: + # VLS returns signatures in final_scriptwitness instead + assert decoded_input['final_scriptwitness'] is not None totally_signed = l2.rpc.signpsbt(half_signed_psbt)['signed_psbt']