@@ -4187,9 +4187,18 @@ def test_anchorspend_using_to_remote(node_factory, bitcoind, anchors):
4187
4187
# Don't need l4 any more
4188
4188
l4 .stop ()
4189
4189
4190
+ for n in (l1 , l2 , l3 ):
4191
+ wait_for (lambda : n .rpc .listchannels () == {'channels' : []})
4192
+
4190
4193
# Now l1->l2<-l3 but push funds to l2 so it can forward.
4191
- node_factory .join_nodes ([l1 , l2 ], wait_for_announce = True )
4192
- node_factory .join_nodes ([l3 , l2 ], wait_for_announce = True )
4194
+ node_factory .join_nodes ([l1 , l2 ])
4195
+ node_factory .join_nodes ([l3 , l2 ])
4196
+
4197
+ # Make sure everyone knows about everyone else!
4198
+ bitcoind .generate_block (5 )
4199
+ for n in (l1 , l2 , l3 ):
4200
+ wait_for (lambda : len (n .rpc .listchannels ()['channels' ]) == 4 )
4201
+
4193
4202
l3 .rpc .pay (l2 .rpc .invoice (200000000 , 'test2' , 'test2' )['bolt11' ])
4194
4203
wait_for (lambda : only_one (l2 .rpc .listpeerchannels (l3 .info ['id' ])['channels' ])['htlcs' ] == [])
4195
4204
@@ -4203,13 +4212,13 @@ def test_anchorspend_using_to_remote(node_factory, bitcoind, anchors):
4203
4212
# Give l2 a sense of urgency, by ensuring there's an HTLC in-channel
4204
4213
# when it needs to go onchain.
4205
4214
# Make sure HTLC expiry is what we expect!
4206
- l2 .daemon .wait_for_log ('Adding HTLC 0 amount=100000000msat cltv=128 gave CHANNEL_ERR_ADD_OK' )
4215
+ l2 .daemon .wait_for_log ('Adding HTLC 0 amount=100000000msat cltv=123 gave CHANNEL_ERR_ADD_OK' )
4207
4216
4208
4217
# Kill l1 and l3, we just care about l2.
4209
4218
l3 .stop ()
4210
4219
l1 .stop ()
4211
4220
4212
- for block in range (117 , 128 ):
4221
+ for block in range (112 , 123 ):
4213
4222
bitcoind .generate_block (1 )
4214
4223
sync_blockheight (bitcoind , [l2 ])
4215
4224
0 commit comments