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:
yyforyongyu 2023-10-27 16:30:58 +08:00
parent 678f416008
commit 5168af55a9
No known key found for this signature in database
GPG Key ID: 9BCD95C4FF296868

View File

@ -122,8 +122,7 @@ func acceptHoldInvoice(ht *lntest.HarnessTest, idx int, sender,
invoice := receiver.RPC.AddHoldInvoice(req)
invStream := receiver.RPC.SubscribeSingleInvoice(hash[:])
inv := ht.ReceiveSingleInvoice(invStream)
require.Equal(ht, lnrpc.Invoice_OPEN, inv.State, "expect open")
ht.AssertInvoiceState(invStream, lnrpc.Invoice_OPEN)
sendReq := &routerrpc.SendPaymentRequest{
PaymentRequest: invoice.PaymentRequest,
@ -145,9 +144,7 @@ func acceptHoldInvoice(ht *lntest.HarnessTest, idx int, sender,
)
require.Len(ht, payment.Htlcs, 1)
inv = ht.ReceiveSingleInvoice(invStream)
require.Equal(ht, lnrpc.Invoice_ACCEPTED, inv.State,
"expected accepted")
ht.AssertInvoiceState(invStream, lnrpc.Invoice_ACCEPTED)
return &holdSubscription{
recipient: receiver,