lnrpc/routerrpc+routing: add new MaxShardAmt field to LightningPayment

This commit is contained in:
Olaoluwa Osuntokun committed 2021-02-15 19:31:49 -08:00
1 parent c70e53c791
commit 7398e59927
2 files changed
+16

No files matched your search

+8
View File
@@ -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,