Merge pull request #1210 from halseth/route-hints-flake
[integration flake] Fix route hints flake
This commit is contained in:
commit
03a7c027e4
20
lnd_test.go
20
lnd_test.go
@ -3433,23 +3433,27 @@ func testInvoiceRoutingHints(net *lntest.NetworkHarness, t *harnessTest) {
|
||||
Private: true,
|
||||
}
|
||||
|
||||
// Due to the way the channels were set up above, the channel between
|
||||
// Alice and Bob should be the only channel used as a routing hint.
|
||||
var predErr error
|
||||
var decoded *lnrpc.PayReq
|
||||
err = lntest.WaitPredicate(func() bool {
|
||||
resp, err := net.Alice.AddInvoice(ctxb, invoice)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to add invoice: %v", err)
|
||||
predErr = fmt.Errorf("unable to add invoice: %v", err)
|
||||
return false
|
||||
}
|
||||
|
||||
// We'll decode the invoice's payment request to determine which
|
||||
// channels were used as routing hints.
|
||||
payReq := &lnrpc.PayReqString{resp.PaymentRequest}
|
||||
decoded, err := net.Alice.DecodePayReq(ctxb, payReq)
|
||||
decoded, err = net.Alice.DecodePayReq(ctxb, payReq)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to decode payment request: %v", err)
|
||||
predErr = fmt.Errorf("unable to decode payment "+
|
||||
"request: %v", err)
|
||||
return false
|
||||
}
|
||||
|
||||
// Due to the way the channels were set up above, the channel between
|
||||
// Alice and Bob should be the only channel used as a routing hint.
|
||||
var predErr error
|
||||
err = lntest.WaitPredicate(func() bool {
|
||||
if len(decoded.RouteHints) != 1 {
|
||||
predErr = fmt.Errorf("expected one route hint, got %d",
|
||||
len(decoded.RouteHints))
|
||||
@ -6518,7 +6522,7 @@ func testMultiHopReceiverChainClaim(net *lntest.NetworkHarness, t *harnessTest)
|
||||
return true
|
||||
}, time.Second*15)
|
||||
if err != nil {
|
||||
t.Fatalf("htlc mismatch: %v", err)
|
||||
t.Fatalf("htlc mismatch: %v", predErr)
|
||||
}
|
||||
|
||||
// Now we'll mine enough blocks to prompt carol to actually go to the
|
||||
|
Loading…
Reference in New Issue
Block a user