mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2025-12-17 22:24:21 +01:00
routing/payment_lifecycle: extract attempt sending logic
Define shardHandler which is a struct holding what is needed to send attempts along given routes. The reason we define the logic on this struct instead of the paymentLifecycle is that we later will make SendToRoute calls not go through the payment lifecycle, but only using this struct. The launch shard is responsible for registering the attempt with the control tower, failing it if the launch fails. Note that it is NOT responsible for marking the _payment_ failed in case a terminal error is encountered. This is important since we will later reuse this method for SendToRoute, where whether to fail the payment cannot be decided on the shard level.
This commit is contained in:
@@ -1827,7 +1827,6 @@ func (r *ChannelRouter) sendPayment(
|
||||
paymentHash: paymentHash,
|
||||
paySession: paySession,
|
||||
currentHeight: currentHeight,
|
||||
lastError: nil,
|
||||
}
|
||||
|
||||
// If a timeout is specified, create a timeout channel. If no timeout is
|
||||
|
||||
Reference in New Issue
Block a user