routing: rename Fail to FailPayment

This commit renames the method `Fail` to be `FailPayment` to explicitly
address its purpose.
This commit is contained in:
yyforyongyu committed 2022-12-07 18:38:01 +08:00
1 parent 2fd4c1e318
commit d1611c999a
6 files changed
+27 -22

No files matched your search

+3 -3
View File
@@ -233,7 +233,7 @@ lifecycle:
// tower, no further shards will be launched and we'll
// return with an error the moment all active shards
// have finished.
saveErr := p.router.cfg.Control.Fail(
saveErr := p.router.cfg.Control.FailPayment(
p.identifier, channeldb.FailureReasonTimeout,
)
if saveErr != nil {
@@ -273,7 +273,7 @@ lifecycle:
"failed with no route: %v",
p.identifier, failureCode)
saveErr := p.router.cfg.Control.Fail(
saveErr := p.router.cfg.Control.FailPayment(
p.identifier, failureCode,
)
if saveErr != nil {
@@ -784,7 +784,7 @@ func (p *shardHandler) handleSendError(attempt *channeldb.HTLCAttemptInfo,
p.identifier, *reason, sendErr)
// Fail the payment via control tower.
if err := p.router.cfg.Control.Fail(
if err := p.router.cfg.Control.FailPayment(
p.identifier, *reason,
); err != nil {
log.Errorf("unable to report failure to control "+