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

Function dont_spend_outputs

tests/test_misc.py:465–470  ·  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

463
464def test_withdraw_misc(node_factory, bitcoind, chainparams):
465 def dont_spend_outputs(n, txid):
466 """Reserve both outputs (we assume there are two!) in case any our ours, so we don't spend change: wrecks accounting checks"""
467 n.rpc.reserveinputs(bitcoind.rpc.createpsbt([{'txid': txid,
468 'vout': 0},
469 {'txid': txid,
470 'vout': 1}], []))
471
472 # We track channel balances, to verify that accounting is ok.
473 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