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

Function test_commitfee_option

tests/test_misc.py:3358–3377  ·  view source on GitHub ↗

Sanity check for the --commit-fee startup option.

(node_factory)

Source from the content-addressed store, hash-verified

3356
3357
3358def test_commitfee_option(node_factory):
3359 """Sanity check for the --commit-fee startup option."""
3360 l1, l2 = node_factory.get_nodes(2, opts=[{"commit-fee": "200",
3361 "start": False},
3362 {"start": False}])
3363
3364 # set_feerates multiplies this by 4 to get perkb; but we divide.
3365 mock_wu = 5000
3366 for l in [l1, l2]:
3367 l.set_feerates((0, mock_wu, 0, 0), False)
3368 l.start()
3369
3370 # plugin gives same results:
3371 assert l1.rpc.call("estimatefees") == l2.rpc.call("estimatefees")
3372
3373 # But feerates differ.
3374 l1_commit_fees = l1.rpc.feerates("perkw")['perkw']['unilateral_close']
3375 l2_commit_fees = l2.rpc.feerates("perkw")['perkw']['unilateral_close']
3376
3377 assert l1_commit_fees == 2 * l2_commit_fees == 2 * mock_wu
3378
3379
3380def test_listtransactions(node_factory):

Callers

nothing calls this directly

Calls 5

get_nodesMethod · 0.80
set_feeratesMethod · 0.80
startMethod · 0.45
callMethod · 0.45
feeratesMethod · 0.45

Tested by

no test coverage detected