rpc: allow wumbo invoices
In this commit, we remove the restriction surrounding the largest invoices that we'll allow a user to create. After #3967 has landed, users will be able to send in _aggregate_ a payment larger than the current max HTLC size limit in the network. As a result, we can just treat that value as the system's MTU, and allow users to request payments it multiples of that MTU value. A follow up to this PR at a later time will also allow wumbo _channels_. However, that requires us to tweak the way we scale CSV values, as post wumbo, there is no true channel size limit, only the _local_ limit of a given node. We also need to implement a way for nodes to signal to other nodes their accepted max channel size.
This commit is contained in:
6 files changed
-32
No files matched your search
@@ -698,18 +698,6 @@ func (r *RouterBackend) extractIntentFromSendRequest(
|
||||
payIntent.DestFeatures = features
|
||||
}
|
||||
|
||||
// Currently, within the bootstrap phase of the network, we limit the
|
||||
// largest payment size allotted to (2^32) - 1 mSAT or 4.29 million
|
||||
// satoshis.
|
||||
if payIntent.Amount > r.MaxPaymentMSat {
|
||||
// In this case, we'll send an error to the caller, but
|
||||
// continue our loop for the next payment.
|
||||
return payIntent, fmt.Errorf("payment of %v is too large, "+
|
||||
"max payment allowed is %v", payIntent.Amount,
|
||||
r.MaxPaymentMSat)
|
||||
|
||||
}
|
||||
|
||||
// Check for disallowed payments to self.
|
||||
if !rpcPayReq.AllowSelfPayment && payIntent.Target == r.SelfNode {
|
||||
return nil, errors.New("self-payments not allowed")
|
||||
|
||||
Reference in new issue
Block a user