Skip to content

Commit f0659d0

Browse files
committed
pytest: fix false bad gossip issue in test_forward
We construct the route manually so we may not have the channel_announcement yet. But we can get an update from the error packet, which can lead to: ``` 2021-01-29T01:38:23.4767334Z ValueError: 2021-01-29T01:38:23.4767987Z Node errors: 2021-01-29T01:38:23.4768767Z - lightningd-1: had bad gossip messages 2021-01-29T01:38:23.4769512Z Global errors: 2021-01-29T01:38:23.4770300Z 2021-01-29T01:38:23.4771109Z contrib/pyln-testing/pyln/testing/fixtures.py:197: ValueError ... 2021-01-29T01:38:23.7820197Z lightningd-1: 2021-01-29T01:26:57.460Z DEBUG gossipd: Extracted channel_update 01027217b3086ad9f3dee1fa55b94c5fd2a4b0637bec70ba727ba4151a8de5173ddc749db3502d41ab0ae164addc8fd013d2088b6a12a2f478ae0affa94d76d8845c06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f000067000001000160136459010000060000000000000000000000010000000a000000003b023380 from onionreply 100d0000007500887217b3086ad9f3dee1fa55b94c5fd2a4b0637bec70ba727ba4151a8de5173ddc749db3502d41ab0ae164addc8fd013d2088b6a12a2f478ae0affa94d76d8845c06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f000067000001000160136459010000060000000000000000000000010000000a000000003b023380 2021-01-29T01:38:23.7837450Z lightningd-1: 2021-01-29T01:26:57.461Z DEBUG gossipd: Bad gossip order: WIRE_CHANNEL_UPDATE before announcement 103x1x1/0 ``` Signed-off-by: Rusty Russell <[email protected]>
1 parent c5bd518 commit f0659d0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tests/test_pay.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,10 +1011,7 @@ def test_decodepay(node_factory):
10111011
@unittest.skipIf(not DEVELOPER, "Too slow without --dev-fast-gossip")
10121012
def test_forward(node_factory, bitcoind):
10131013
# Connect 1 -> 2 -> 3.
1014-
l1, l2, l3 = node_factory.line_graph(3, fundchannel=True)
1015-
1016-
# Allow announce messages.
1017-
l1.bitcoin.generate_block(5)
1014+
l1, l2, l3 = node_factory.line_graph(3, wait_for_announce=True)
10181015

10191016
# If they're at different block heights we can get spurious errors.
10201017
sync_blockheight(bitcoind, [l1, l2, l3])

0 commit comments

Comments
 (0)