htlcswitch+routing: rename GetPaymentResult to GetAttemptResult

This commit renames the method `GetPaymentResult` to be
`GetAttemptResult` to avoid potential confusion and to address the
one-to-many relationship between a payment and its attempts.
This commit is contained in:
yyforyongyu committed 2022-12-07 18:38:01 +08:00
1 parent d1611c999a
commit e3bc4f4cc9
9 files changed
+54 -54

No files matched your search

+2 -2
View File
@@ -1306,7 +1306,7 @@ func TestChannelLinkMultiHopUnknownPaymentHash(t *testing.T) {
)
require.NoError(t, err, "unable to get send payment")
resultChan, err := n.aliceServer.htlcSwitch.GetPaymentResult(
resultChan, err := n.aliceServer.htlcSwitch.GetAttemptResult(
pid, htlc.PaymentHash, newMockDeobfuscator(),
)
require.NoError(t, err, "unable to get payment result")
@@ -3979,7 +3979,7 @@ func TestChannelLinkAcceptDuplicatePayment(t *testing.T) {
)
require.NoError(t, err, "unable to send payment to carol")
resultChan, err := n.aliceServer.htlcSwitch.GetPaymentResult(
resultChan, err := n.aliceServer.htlcSwitch.GetAttemptResult(
pid, htlc.PaymentHash, newMockDeobfuscator(),
)
require.NoError(t, err, "unable to get payment result")