mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-10 21:05:11 +02:00
routing: move payment session constructor
This commit is contained in:
@@ -140,18 +140,20 @@ func (c *integratedRoutingContext) testPayment(maxShards uint32) ([]htlcAttempt,
|
||||
MaxShards: maxShards,
|
||||
}
|
||||
|
||||
session := &paymentSession{
|
||||
getBandwidthHints: getBandwidthHints,
|
||||
payment: &payment,
|
||||
pathFinder: findPath,
|
||||
getRoutingGraph: func() (routingGraph, func(), error) {
|
||||
session, err := newPaymentSession(
|
||||
&payment, getBandwidthHints,
|
||||
func() (routingGraph, func(), error) {
|
||||
return c.graph, func() {}, nil
|
||||
},
|
||||
pathFindingConfig: c.pathFindingCfg,
|
||||
missionControl: mc,
|
||||
minShardAmt: lnwire.NewMSatFromSatoshis(5000),
|
||||
mc, c.pathFindingCfg,
|
||||
)
|
||||
if err != nil {
|
||||
c.t.Fatal(err)
|
||||
}
|
||||
|
||||
// Override default minimum shard amount.
|
||||
session.minShardAmt = lnwire.NewMSatFromSatoshis(5000)
|
||||
|
||||
// Now the payment control loop starts. It will keep trying routes until
|
||||
// the payment succeeds.
|
||||
var (
|
||||
|
Reference in New Issue
Block a user