Skip to content

Commit

Permalink
pytest: test that we properly apply channel_update.
Browse files Browse the repository at this point in the history
Spoiler: we don't, we simply give up!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell committed Sep 22, 2021
1 parent eaec226 commit 809cd54
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/test_pay.py
Original file line number Diff line number Diff line change
Expand Up @@ -4613,3 +4613,30 @@ def test_pay_low_max_htlcs(node_factory):
l1.daemon.wait_for_log(
r'Number of pre-split HTLCs \([0-9]+\) exceeds our HTLC budget \([0-9]+\), skipping pre-splitter'
)


@pytest.mark.developer("Too slow without dev-fast-gossip")
def test_channelfee_error_update(node_factory, bitcoind):
l1, l2, l3, l4 = node_factory.line_graph(4, wait_for_announce=True,
opts={'fee-base': 1,
'fee-per-satoshi': 10000,
'may_reconnect': True})

# Now it's all propagated, restart with normal 60 second gossip delay.
l2.stop()
l3.stop()
del l2.daemon.opts['dev-fast-gossip']
del l3.daemon.opts['dev-fast-gossip']
l2.start()
l3.start()
l2.rpc.connect(l1.info['id'], 'localhost', l1.port)
l2.rpc.connect(l3.info['id'], 'localhost', l3.port)
l3.rpc.connect(l4.info['id'], 'localhost', l4.port)

inv = l4.rpc.invoice(1000, "test", "test")
# Update fee in l3, pay command on l1 should still work.
l3.rpc.setchannelfee("all", 2, 10000, 0)
l1.rpc.pay(inv['bolt11'])

assert l1.daemon.is_in_log('WIRE_FEE_INSUFFICIENT')
assert l1.daemon.is_in_log('Extracted channel_update')

0 comments on commit 809cd54

Please sign in to comment.