MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_sign_signed_psbt

Function test_sign_signed_psbt

tests/test_wallet.py:979–991  ·  view source on GitHub ↗
(node_factory, bitcoind, chainparams)

Source from the content-addressed store, hash-verified

977
978
979def test_sign_signed_psbt(node_factory, bitcoind, chainparams):
980 l1 = node_factory.get_node()
981 l1.fundwallet(10**6)
982
983 psbt = l1.rpc.txprepare([{l1.rpc.newaddr('bech32')['bech32']: 10000}])['psbt']
984 signed_psbt = l1.rpc.signpsbt(psbt)['signed_psbt']
985
986 # libwally >= 1.5.2 ignores duplicate taproot keypath entries
987 # (issue: ElementsProject/libwally-core#509,
988 # commit with fix: ElementsProject/libwally-core#7e483c049b0a4405801f010e60c9f0335d2a617f),
989 # so re-signing an already signed PSBT input is now a noop
990 # rather than an error, on both bitcoin and liquid.
991 assert l1.rpc.signpsbt(signed_psbt)['signed_psbt'] == signed_psbt
992
993
994def test_psbt_version(node_factory, bitcoind, chainparams):

Callers

nothing calls this directly

Calls 5

fundwalletMethod · 0.80
txprepareMethod · 0.80
signpsbtMethod · 0.80
get_nodeMethod · 0.45
newaddrMethod · 0.45

Tested by

no test coverage detected