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

@@ -787,7 +787,7 @@ func preparePayment(sendingPeer, receivingPeer lnpeer.Peer,
if err != nil {
return err
}
resultChan, err := sender.htlcSwitch.GetPaymentResult(
resultChan, err := sender.htlcSwitch.GetAttemptResult(
pid, hash, newMockDeobfuscator(),
)
if err != nil {
@@ -1345,7 +1345,7 @@ func (n *twoHopNetwork) makeHoldPayment(sendingPeer, receivingPeer lnpeer.Peer,
}
go func() {
resultChan, err := sender.htlcSwitch.GetPaymentResult(
resultChan, err := sender.htlcSwitch.GetAttemptResult(
pid, rhash, newMockDeobfuscator(),
)
if err != nil {