mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-13 18:10:25 +02:00
lntest+itest: change the method signature of AssertPaymentStatus
So this can be used in other tests when we only care about the payment hash.
This commit is contained in:
@@ -185,9 +185,7 @@ func testHoldInvoicePersistence(ht *lntest.HarnessTest) {
|
||||
payStream := alice.RPC.TrackPaymentV2(hash[:])
|
||||
ht.ReceiveTrackPayment(payStream)
|
||||
|
||||
ht.AssertPaymentStatus(
|
||||
alice, preimg, lnrpc.Payment_IN_FLIGHT,
|
||||
)
|
||||
ht.AssertPaymentStatus(alice, hash, lnrpc.Payment_IN_FLIGHT)
|
||||
}
|
||||
|
||||
// Settle invoices half the invoices, cancel the rest.
|
||||
@@ -211,11 +209,11 @@ func testHoldInvoicePersistence(ht *lntest.HarnessTest) {
|
||||
for i, preimg := range preimages {
|
||||
if i%2 == 0 {
|
||||
ht.AssertPaymentStatus(
|
||||
alice, preimg, lnrpc.Payment_SUCCEEDED,
|
||||
alice, preimg.Hash(), lnrpc.Payment_SUCCEEDED,
|
||||
)
|
||||
} else {
|
||||
payment := ht.AssertPaymentStatus(
|
||||
alice, preimg, lnrpc.Payment_FAILED,
|
||||
alice, preimg.Hash(), lnrpc.Payment_FAILED,
|
||||
)
|
||||
require.Equal(ht, reason, payment.FailureReason,
|
||||
"wrong failure reason")
|
||||
|
Reference in New Issue
Block a user