mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-26 20:26:34 +02:00
rpcserver: add time_lock_delta
overflow check
This commit is contained in:
@@ -348,7 +348,7 @@ func AddInvoice(ctx context.Context, cfg *AddInvoiceConfig,
|
||||
// We'll use our current default CLTV value unless one was specified as
|
||||
// an option on the command line when creating an invoice.
|
||||
switch {
|
||||
case invoice.CltvExpiry > math.MaxUint16:
|
||||
case invoice.CltvExpiry > routing.MaxCLTVDelta:
|
||||
return nil, nil, fmt.Errorf("CLTV delta of %v is too large, "+
|
||||
"max accepted is: %v", invoice.CltvExpiry,
|
||||
math.MaxUint16)
|
||||
|
Reference in New Issue
Block a user