rpcserver: add time_lock_delta overflow check

This commit is contained in:
Eval EXEC committed 2023-03-23 21:34:12 +08:00
1 parent 3dc4ab736f
commit cbcbddfe29
6 files changed
+48 -8

No files matched your search

+5
View File
@@ -4,6 +4,7 @@ import (
"bytes"
goErrors "errors"
"fmt"
"math"
"runtime"
"strings"
"sync"
@@ -80,6 +81,10 @@ const (
// bitcoin (160 for litecoin), though we now clamp the lower end of this
// range for user-chosen deltas to 18 blocks to be conservative.
MinCLTVDelta = 18
// MaxCLTVDelta is the maximum CLTV value accepted by LND for all
// timelock deltas.
MaxCLTVDelta = math.MaxUint16
)
var (