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

Function test_closing_negotiation_step_100pct

tests/test_closing.py:461–477  ·  view source on GitHub ↗

Test that the closing fee negotiation step works, 100%

(node_factory, bitcoind, chainparams)

Source from the content-addressed store, hash-verified

459
460@unittest.skipIf(TEST_NETWORK == 'liquid-regtest', "Different closing fees")
461def test_closing_negotiation_step_100pct(node_factory, bitcoind, chainparams):
462 """Test that the closing fee negotiation step works, 100%"""
463 opts = {}
464 opts['fee_negotiation_step'] = '100%'
465
466 opts['close_initiated_by'] = 'opener'
467 opts['expected_close_fee'] = 20001
468 closing_negotiation_step(node_factory, bitcoind, chainparams, opts)
469
470 # The close fee of 20499 looks strange in this case - one would expect
471 # to have a number close to 21000. This is because
472 # * the range is initially set to [20000 (peer), 21000 (opener)]
473 # * the opener is always first to propose, he uses 50% step, so he proposes 20500
474 # * the range is narrowed to [20001, 20499] and the peer proposes 20499
475 opts['close_initiated_by'] = 'peer'
476 opts['expected_close_fee'] = 20499
477 closing_negotiation_step(node_factory, bitcoind, chainparams, opts)
478
479
480@unittest.skipIf(TEST_NETWORK == 'liquid-regtest', "Different closing fees")

Callers

nothing calls this directly

Calls 1

closing_negotiation_stepFunction · 0.85

Tested by

no test coverage detected