pytest: fix splicing tests to be more explicit, and not rely in private gossip messages.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2024-01-30 04:50:12 +10:30
parent e30eadd6a9
commit 412bb137e0
2 changed files with 2 additions and 9 deletions

View File

@ -37,7 +37,6 @@ def test_splice(node_factory, bitcoind):
l2.daemon.wait_for_log(r'CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL')
l1.daemon.wait_for_log(r'CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL')
l1.daemon.wait_for_log(r'private channel announcement from channeld for ' + first_scid(l1, l2))
inv = l2.rpc.invoice(10**2, '3', 'no_3')
l1.rpc.pay(inv['bolt11'])
@ -81,7 +80,7 @@ def test_splice_gossip(node_factory, bitcoind):
assert post_splice_scid != pre_splice_scid
# l3 should see the new channel now.
wait_for(lambda: l3.rpc.listchannels(short_channel_id=post_splice_scid)['channels'] != [])
wait_for(lambda: len(l3.rpc.listchannels(short_channel_id=post_splice_scid)['channels']) == 2)
assert len(l3.rpc.listchannels(short_channel_id=pre_splice_scid)['channels']) == 2
bitcoind.generate_block(7)
@ -132,7 +131,6 @@ def test_splice_listnodes(node_factory, bitcoind):
l2.daemon.wait_for_log(r'CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL')
l1.daemon.wait_for_log(r'CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL')
l1.daemon.wait_for_log(r'private channel announcement from channeld for ' + first_scid(l1, l2))
bitcoind.generate_block(7)
@ -166,7 +164,6 @@ def test_splice_out(node_factory, bitcoind):
l2.daemon.wait_for_log(r'CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL')
l1.daemon.wait_for_log(r'CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL')
l1.daemon.wait_for_log(r'private channel announcement from channeld for ' + first_scid(l1, l2))
inv = l2.rpc.invoice(10**2, '3', 'no_3')
l1.rpc.pay(inv['bolt11'])
@ -223,7 +220,6 @@ def test_invalid_splice(node_factory, bitcoind):
l2.daemon.wait_for_log(r'CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL')
l1.daemon.wait_for_log(r'CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL')
l1.daemon.wait_for_log(r'private channel announcement from channeld for ' + first_scid(l1, l2))
inv = l2.rpc.invoice(10**2, '3', 'no_3')
l1.rpc.pay(inv['bolt11'])
@ -273,7 +269,6 @@ def test_commit_crash_splice(node_factory, bitcoind):
l2.daemon.wait_for_log(r'CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL')
l1.daemon.wait_for_log(r'CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL')
l1.daemon.wait_for_log(r'private channel announcement from channeld for ' + first_scid(l1, l2))
time.sleep(1)

View File

@ -4,7 +4,7 @@ import unittest
import time
from pyln.testing.utils import EXPERIMENTAL_DUAL_FUND
from utils import (
TEST_NETWORK, first_scid
TEST_NETWORK
)
@ -53,7 +53,6 @@ def test_splice_disconnect_sig(node_factory, bitcoind):
l1.daemon.wait_for_log(r'CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL')
l2.daemon.wait_for_log(r'CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL')
l1.daemon.wait_for_log(r'private channel announcement from channeld for ' + first_scid(l1, l2))
inv = l2.rpc.invoice(10**2, '3', 'no_3')
l1.rpc.pay(inv['bolt11'])
@ -109,7 +108,6 @@ def test_splice_disconnect_commit(node_factory, bitcoind, executor):
l1.daemon.wait_for_log(r'CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL')
l2.daemon.wait_for_log(r'CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL')
l1.daemon.wait_for_log(r'private channel announcement from channeld for ' + first_scid(l1, l2))
inv = l2.rpc.invoice(10**2, '3', 'no_3')
l1.rpc.pay(inv['bolt11'])