Skip to content

Commit ba41d6e

Browse files
rustyrussellniftynei
authored andcommitted
pytest: failing test for overflow in query_channel_range
Signed-off-by: Rusty Russell <[email protected]>
1 parent 52750f2 commit ba41d6e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/test_gossip.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,7 @@ def check_gossip(n):
558558

559559

560560
@unittest.skipIf(not DEVELOPER, "needs DEVELOPER=1")
561+
@pytest.mark.xfail(strict=True)
561562
def test_gossip_query_channel_range(node_factory, bitcoind):
562563
l1, l2, l3, l4 = node_factory.line_graph(4, opts={'log-level': 'io'},
563564
fundchannel=False)
@@ -682,6 +683,16 @@ def test_gossip_query_channel_range(node_factory, bitcoind):
682683
assert ret['short_channel_ids'][1] == scid23
683684
l2.daemon.wait_for_log('queue_channel_ranges full: splitting')
684685

686+
# Test overflow case doesn't split forever; should only get 32 for this.
687+
ret = l1.rpc.dev_query_channel_range(id=l2.info['id'],
688+
first=1,
689+
num=429496000)
690+
l1.daemon.wait_for_logs([r'\[IN\] 0108'] * 32)
691+
692+
# And no more!
693+
time.sleep(1)
694+
assert not l1.daemon.is_in_log(r'\[IN\] 0108', start=l1.daemon.logsearch_start)
695+
685696
# This should actually be large enough for zlib to kick in!
686697
l3.fund_channel(l4, 10**5)
687698
bitcoind.generate_block(5)

0 commit comments

Comments
 (0)