Skip to content

Commit

Permalink
pytest: test custom config options for fees and htlc limits
Browse files Browse the repository at this point in the history
  • Loading branch information
m-schmoock authored and rustyrussell committed Apr 4, 2022
1 parent 62df569 commit 0799328
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/test_pay.py
Original file line number Diff line number Diff line change
Expand Up @@ -2384,6 +2384,29 @@ def test_setchannel_all(node_factory, bitcoind):
assert result['channels'][1]['maximum_htlc_out_msat'] == 0xCAFE


@pytest.mark.developer("updates are delayed without --dev-fast-gossip")
def test_setchannel_startup_opts(node_factory, bitcoind):
"""Tests that custom config/cmdline options are applied correctly when set
"""
opts = {
'fee-base': 2,
'fee-per-satoshi': 3,
'htlc-minimum-msat': '4msat',
'htlc-maximum-msat': '5msat'
}
l1, l2 = node_factory.line_graph(2, opts=opts, wait_for_announce=True)

result = l2.rpc.listchannels()['channels']
assert result[0]['base_fee_millisatoshi'] == 2
assert result[0]['fee_per_millionth'] == 3
assert result[0]['htlc_minimum_msat'] == Millisatoshi(4)
assert result[0]['htlc_maximum_msat'] == Millisatoshi(5)
assert result[1]['base_fee_millisatoshi'] == 2
assert result[1]['fee_per_millionth'] == 3
assert result[1]['htlc_minimum_msat'] == Millisatoshi(4)
assert result[1]['htlc_maximum_msat'] == Millisatoshi(5)


@pytest.mark.developer("gossip without DEVELOPER=1 is slow")
def test_channel_spendable(node_factory, bitcoind):
"""Test that spendable_msat is accurate"""
Expand Down

0 comments on commit 0799328

Please sign in to comment.