mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-19 21:31:04 +02:00
itest: fix flake in max_htlc_pathfind
``` lnd_max_htlcs_test.go:149: Error Trace: /home/runner/work/lnd/lnd/itest/lnd_max_htlcs_test.go:149 /home/runner/work/lnd/lnd/itest/lnd_max_htlcs_test.go:40 /home/runner/work/lnd/lnd/lntest/harness.go:286 /home/runner/work/lnd/lnd/itest/lnd_test.go:136 Error: Not equal: expected: 3 actual : 0 Test: TestLightningNetworkDaemon/tranche01/60-of-134/btcd/max_htlc_pathfind Messages: expected accepted ```
This commit is contained in:
parent
678f416008
commit
5168af55a9
@ -122,8 +122,7 @@ func acceptHoldInvoice(ht *lntest.HarnessTest, idx int, sender,
|
|||||||
invoice := receiver.RPC.AddHoldInvoice(req)
|
invoice := receiver.RPC.AddHoldInvoice(req)
|
||||||
|
|
||||||
invStream := receiver.RPC.SubscribeSingleInvoice(hash[:])
|
invStream := receiver.RPC.SubscribeSingleInvoice(hash[:])
|
||||||
inv := ht.ReceiveSingleInvoice(invStream)
|
ht.AssertInvoiceState(invStream, lnrpc.Invoice_OPEN)
|
||||||
require.Equal(ht, lnrpc.Invoice_OPEN, inv.State, "expect open")
|
|
||||||
|
|
||||||
sendReq := &routerrpc.SendPaymentRequest{
|
sendReq := &routerrpc.SendPaymentRequest{
|
||||||
PaymentRequest: invoice.PaymentRequest,
|
PaymentRequest: invoice.PaymentRequest,
|
||||||
@ -145,9 +144,7 @@ func acceptHoldInvoice(ht *lntest.HarnessTest, idx int, sender,
|
|||||||
)
|
)
|
||||||
require.Len(ht, payment.Htlcs, 1)
|
require.Len(ht, payment.Htlcs, 1)
|
||||||
|
|
||||||
inv = ht.ReceiveSingleInvoice(invStream)
|
ht.AssertInvoiceState(invStream, lnrpc.Invoice_ACCEPTED)
|
||||||
require.Equal(ht, lnrpc.Invoice_ACCEPTED, inv.State,
|
|
||||||
"expected accepted")
|
|
||||||
|
|
||||||
return &holdSubscription{
|
return &holdSubscription{
|
||||||
recipient: receiver,
|
recipient: receiver,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user