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
2021-04-12 15:21:59 +02:00
parent 6474b253d6
commit 41ae3530a3
4 changed files with 137 additions and 46 deletions

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,