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

Function test_setchannel_startup_opts

tests/test_pay.py:2561–2580  ·  view source on GitHub ↗

Tests that custom config/cmdline options are applied correctly when set

(node_factory, bitcoind)

Source from the content-addressed store, hash-verified

2559
2560
2561def test_setchannel_startup_opts(node_factory, bitcoind):
2562 """Tests that custom config/cmdline options are applied correctly when set
2563 """
2564 opts = {
2565 'fee-base': 2,
2566 'fee-per-satoshi': 3,
2567 'htlc-minimum-msat': '4msat',
2568 'htlc-maximum-msat': '5msat'
2569 }
2570 l1, l2 = node_factory.line_graph(2, opts=opts, wait_for_announce=True)
2571
2572 result = l2.rpc.listchannels()['channels']
2573 assert result[0]['base_fee_millisatoshi'] == 2
2574 assert result[0]['fee_per_millionth'] == 3
2575 assert result[0]['htlc_minimum_msat'] == Millisatoshi(4)
2576 assert result[0]['htlc_maximum_msat'] == Millisatoshi(5)
2577 assert result[1]['base_fee_millisatoshi'] == 2
2578 assert result[1]['fee_per_millionth'] == 3
2579 assert result[1]['htlc_minimum_msat'] == Millisatoshi(4)
2580 assert result[1]['htlc_maximum_msat'] == Millisatoshi(5)
2581
2582
2583@pytest.mark.parametrize("anchors", [False, True])

Callers

nothing calls this directly

Calls 3

MillisatoshiClass · 0.90
line_graphMethod · 0.80
listchannelsMethod · 0.45

Tested by

no test coverage detected