routing/payment_lifecycle: use ShardTracker to track shards

We'll let the payment's lifecycle register each shard it's sending with
the ShardTracker, canceling failed shards. This will be the foundation
for correct AMP derivation for each shard we'll send.
This commit is contained in:
Johan T. Halseth committed 2021-04-27 09:43:40 +02:00
1 parent 6474b253d6
commit 41ae3530a3
4 files changed
+137 -46

No files matched your search

+2
View File
@@ -194,6 +194,8 @@ func newRoute(sourceVertex route.Vertex,
}
// Otherwise attach the mpp record if it exists.
// TODO(halseth): move this to payment life cycle,
// where AMP options are set.
if finalHop.paymentAddr != nil {
mpp = record.NewMPP(
finalHop.totalAmt,