developer: consolidiate gossip timing options into one --dev-fast-gossip.

It's generally clearer to have simple hardcoded numbers with an
#if DEVELOPER around it, than apparent variables which aren't, really.

Interestingly, our pruning test was always kinda broken: we have to pass
two cycles, since l2 will refresh the channel once to avoid pruning.

Do the more obvious thing, and cut the network in half and check that
l1 and l3 time out.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-09-18 10:35:05 +09:30
parent 8139164aa0
commit 147eaced2e
33 changed files with 138 additions and 149 deletions

View File

@@ -916,7 +916,7 @@ def test_decodepay(node_factory):
l1.rpc.decodepay('1111111')
@unittest.skipIf(not DEVELOPER, "Too slow without --dev-bitcoind-poll")
@unittest.skipIf(not DEVELOPER, "Too slow without --dev-fast-gossip")
def test_forward(node_factory, bitcoind):
# Connect 1 -> 2 -> 3.
l1, l2, l3 = node_factory.line_graph(3, fundchannel=True)
@@ -975,7 +975,7 @@ def test_forward(node_factory, bitcoind):
l1.rpc.waitsendpay(rhash)
@unittest.skipIf(not DEVELOPER, "needs DEVELOPER=1 for --dev-broadcast-interval")
@unittest.skipIf(not DEVELOPER, "needs --dev-fast-gossip")
def test_forward_different_fees_and_cltv(node_factory, bitcoind):
# FIXME: Check BOLT quotes here too
# BOLT #7:
@@ -1111,7 +1111,7 @@ def test_forward_different_fees_and_cltv(node_factory, bitcoind):
assert c[1]['source'] == c[0]['destination']
@unittest.skipIf(not DEVELOPER, "needs DEVELOPER=1 for --dev-broadcast-interval")
@unittest.skipIf(not DEVELOPER, "too slow without --dev-fast-gossip")
def test_forward_pad_fees_and_cltv(node_factory, bitcoind):
"""Test that we are allowed extra locktime delta, and fees"""
@@ -1799,7 +1799,7 @@ def test_pay_direct(node_factory, bitcoind):
assert l1l2msat == l1l2msatreference
@unittest.skipIf(not DEVELOPER, "updates are delayed without --dev-broadcast-interval")
@unittest.skipIf(not DEVELOPER, "updates are delayed without --dev-fast-gossip")
def test_setchannelfee_usage(node_factory, bitcoind):
# TEST SETUP
#
@@ -2132,7 +2132,7 @@ def test_setchannelfee_restart(node_factory, bitcoind):
assert result['msatoshi_sent'] == 5002020
@unittest.skipIf(not DEVELOPER, "updates are delayed without --dev-broadcast-interval")
@unittest.skipIf(not DEVELOPER, "updates are delayed without --dev-fast-gossip")
def test_setchannelfee_all(node_factory, bitcoind):
# TEST SETUP
#