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
2022-06-10 00:59:31 +08:00
parent d1611c999a
commit e3bc4f4cc9
9 changed files with 54 additions and 54 deletions

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")