routing: stop tracking totalAmount in paymentLifecycle

This commit removes the field `totalAmount` from `paymentLifecycle` and
only reads it from the channeldb payment.
This commit is contained in:
yyforyongyu committed 2022-12-07 18:38:01 +08:00
1 parent e3bc4f4cc9
commit 8d49dfb07e
5 files changed
+33 -21

No files matched your search

+1
View File
@@ -758,6 +758,7 @@ func (m *mockControlTower) FetchPayment(phash lntypes.Hash) (
// Make a copy of the payment here to avoid data race.
p := args.Get(0).(*channeldb.MPPayment)
payment := &channeldb.MPPayment{
Info: p.Info,
FailureReason: p.FailureReason,
}
payment.HTLCs = make([]channeldb.HTLCAttempt, len(p.HTLCs))