Skip to content

Commit

Permalink
tests: Fix test_sign_and_send_psbt wrt VLS signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
ksedgwic committed Nov 28, 2023
1 parent 9f3e3d1 commit fb47a15
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/test_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down Expand Up @@ -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']

Expand Down

0 comments on commit fb47a15

Please sign in to comment.