@ -1391,14 +1391,40 @@ def test_restart_many_payments(node_factory):
inchans = [ ]
for n in innodes :
n . rpc . connect ( l1 . info [ ' id ' ] , ' localhost ' , l1 . port )
inchans . append ( n . fund_channel ( l1 , 10 * * 6 ) )
inchans . append ( n . fund_channel ( l1 , 10 * * 6 , False ) )
# Nodes with channels out of the main node
outnodes = node_factory . get_nodes ( len ( innodes ) , opts = { ' may_reconnect ' : True } )
outchans = [ ]
for n in outnodes :
n . rpc . connect ( l1 . info [ ' id ' ] , ' localhost ' , l1 . port )
outchans . append ( l1 . fund_channel ( n , 10 * * 6 ) )
outchans . append ( l1 . fund_channel ( n , 10 * * 6 , False ) )
# Now do all the waiting at once: if !DEVELOPER, this can be *very* slow!
l1_logs = [ ]
for i in range ( len ( innodes ) ) :
scid = inchans [ i ]
l1_logs + = [ r ' update for channel {} \ (0 \ ) now ACTIVE ' . format ( scid ) ,
r ' update for channel {} \ (1 \ ) now ACTIVE ' . format ( scid ) ,
' to CHANNELD_NORMAL ' ]
innodes [ i ] . daemon . wait_for_logs ( [ r ' update for channel {} \ (0 \ ) now ACTIVE '
. format ( scid ) ,
r ' update for channel {} \ (1 \ ) now ACTIVE '
. format ( scid ) ,
' to CHANNELD_NORMAL ' ] )
for i in range ( len ( outnodes ) ) :
scid = outchans [ i ]
l1_logs + = [ r ' update for channel {} \ (0 \ ) now ACTIVE ' . format ( scid ) ,
r ' update for channel {} \ (1 \ ) now ACTIVE ' . format ( scid ) ,
' to CHANNELD_NORMAL ' ]
outnodes [ i ] . daemon . wait_for_logs ( [ r ' update for channel {} \ (0 \ ) now ACTIVE '
. format ( scid ) ,
r ' update for channel {} \ (1 \ ) now ACTIVE '
. format ( scid ) ,
' to CHANNELD_NORMAL ' ] )
l1 . daemon . wait_for_logs ( l1_logs )
# Manually create routes, get invoices
Payment = namedtuple ( ' Payment ' , [ ' innode ' , ' route ' , ' payment_hash ' ] )