test: within testListPayments also wait for bob to learn of channel

This commit is contained in:
Olaoluwa Osuntokun 2017-09-18 17:16:43 -07:00
parent dc39d3f2c5
commit 3e97aa3931
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21
1 changed files with 5 additions and 2 deletions

View File

@ -1145,11 +1145,14 @@ func testListPayments(net *networkHarness, t *harnessTest) {
// Wait for Alice to recognize and advertise the new channel generated
// above.
ctxt, _ = context.WithTimeout(ctxb, timeout)
err = net.Alice.WaitForNetworkChannelOpen(ctxt, chanPoint)
if err != nil {
if err = net.Alice.WaitForNetworkChannelOpen(ctxt, chanPoint); err != nil {
t.Fatalf("alice didn't advertise channel before "+
"timeout: %v", err)
}
if err = net.Bob.WaitForNetworkChannelOpen(ctxt, chanPoint); err != nil {
t.Fatalf("bob didn't advertise channel before "+
"timeout: %v", err)
}
// With the invoice for Bob added, send a payment towards Alice paying
// to the above generated invoice.