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

Function dont_spend_outputs

tests/test_misc.py:595–600  ·  view source on GitHub ↗

Reserve both outputs (we assume there are two!) in case any our ours, so we don't spend change: wrecks accounting checks

(n, txid)

Source from the content-addressed store, hash-verified

593@unittest.skipIf(TEST_NETWORK == 'liquid-regtest', "P2TR not yet supported on Elements")
594def test_withdraw_misc(node_factory, bitcoind, chainparams):
595 def dont_spend_outputs(n, txid):
596 """Reserve both outputs (we assume there are two!) in case any our ours, so we don't spend change: wrecks accounting checks"""
597 n.rpc.reserveinputs(bitcoind.rpc.createpsbt([{'txid': txid,
598 'vout': 0},
599 {'txid': txid,
600 'vout': 1}], []))
601
602 # We track channel balances, to verify that accounting is ok.
603 coin_mvt_plugin = os.path.join(os.getcwd(), 'tests/plugins/coin_movements.py')

Callers 1

test_withdraw_miscFunction · 0.85

Calls 1

reserveinputsMethod · 0.80

Tested by

no test coverage detected