mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-25 18:11:08 +02:00
lnrpc/routerrpc+routing: add new MaxShardAmt field to LightningPayment
This commit is contained in:
@@ -572,6 +572,14 @@ func (r *RouterBackend) extractIntentFromSendRequest(
|
||||
}
|
||||
payIntent.MaxParts = maxParts
|
||||
|
||||
// If this payment had a max shard amount specified, then we'll apply
|
||||
// that now, which'll force us to always make payment splits smaller
|
||||
// than this.
|
||||
if rpcPayReq.MaxShardSizeMsat > 0 {
|
||||
shardAmtMsat := lnwire.MilliSatoshi(rpcPayReq.MaxShardSizeMsat)
|
||||
payIntent.MaxShardAmt = &shardAmtMsat
|
||||
}
|
||||
|
||||
// Take fee limit from request.
|
||||
payIntent.FeeLimit, err = lnrpc.UnmarshallAmt(
|
||||
rpcPayReq.FeeLimitSat, rpcPayReq.FeeLimitMsat,
|
||||
|
Reference in New Issue
Block a user