multi: move 3 vars from walletrpc+lncfg to chanfunding

This commit moves the constants LndInternalLockID and
DefaultLockDuration from the walletrpc package to the chanfunding
package, moves DefaultReservationTimeout from lncfg to chanfunding,
and also updates the lncli package with the new location.
This commit is contained in:
Alex Akselrod committed 2024-03-13 09:50:16 -07:00
1 parent 07ba9d6015
commit 4d2ab7423f
8 files changed
+42 -31

No files matched your search

-4
View File
@@ -69,10 +69,6 @@ const (
// closure.
DefaultOutgoingCltvRejectDelta = DefaultOutgoingBroadcastDelta + 3
// DefaultReservationTimeout is the default time we wait until we remove
// an unfinished (zombiestate) open channel flow from memory.
DefaultReservationTimeout = 10 * time.Minute
// DefaultZombieSweeperInterval is the default time interval at which
// unfinished (zombiestate) open channel flows are purged from memory.
DefaultZombieSweeperInterval = 1 * time.Minute
+3 -1
View File
@@ -4,6 +4,8 @@ package lncfg
import (
"time"
"github.com/lightningnetwork/lnd/lnwallet/chanfunding"
)
// IsDevBuild returns a bool to indicate whether we are in a development
@@ -37,7 +39,7 @@ func (d *DevConfig) GetUnsafeDisconnect() bool {
// GetReservationTimeout returns the config value for `ReservationTimeout`.
func (d *DevConfig) GetReservationTimeout() time.Duration {
return DefaultReservationTimeout
return chanfunding.DefaultReservationTimeout
}
// GetZombieSweeperInterval returns the config value for`ZombieSweeperInterval`.
+3 -1
View File
@@ -4,6 +4,8 @@ package lncfg
import (
"time"
"github.com/lightningnetwork/lnd/lnwallet/chanfunding"
)
// IsDevBuild returns a bool to indicate whether we are in a development
@@ -33,7 +35,7 @@ func (d *DevConfig) ChannelReadyWait() time.Duration {
// GetReservationTimeout returns the config value for `ReservationTimeout`.
func (d *DevConfig) GetReservationTimeout() time.Duration {
if d.ReservationTimeout == 0 {
return DefaultReservationTimeout
return chanfunding.DefaultReservationTimeout
}
return d.ReservationTimeout