lnd/lncfg/dev.go
Nishant Bansal 4569c07e08
multi: Add itest for funding timeout
This commit adds an integration test that
verifies the funding timeout behavior in the
funding manager, in dev/integration test.
Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
2025-03-07 21:32:38 +05:30

54 lines
1.6 KiB
Go

//go:build !integration
package lncfg
import (
"time"
"github.com/lightningnetwork/lnd/lnwallet/chanfunding"
)
// IsDevBuild returns a bool to indicate whether we are in a development
// environment.
//
// NOTE: always return false here.
func IsDevBuild() bool {
return false
}
// DevConfig specifies development configs used for production. This struct
// should always remain empty.
type DevConfig struct{}
// ChannelReadyWait returns the config value, which is always 0 for production
// build.
func (d *DevConfig) ChannelReadyWait() time.Duration {
return 0
}
// GetUnsafeDisconnect returns the config value, which is always true for
// production build.
//
// TODO(yy): this is a temporary solution to allow users to reconnect peers to
// trigger a reestablishiment for the active channels. Once a new dedicated RPC
// is added to realize that functionality, this function should return false to
// forbidden disconnecting peers while there are active channels.
func (d *DevConfig) GetUnsafeDisconnect() bool {
return true
}
// GetReservationTimeout returns the config value for `ReservationTimeout`.
func (d *DevConfig) GetReservationTimeout() time.Duration {
return chanfunding.DefaultReservationTimeout
}
// GetZombieSweeperInterval returns the config value for`ZombieSweeperInterval`.
func (d *DevConfig) GetZombieSweeperInterval() time.Duration {
return DefaultZombieSweeperInterval
}
// GetMaxWaitNumBlocksFundingConf returns the config value for
// `MaxWaitNumBlocksFundingConf`.
func (d *DevConfig) GetMaxWaitNumBlocksFundingConf() uint32 {
return DefaultMaxWaitNumBlocksFundingConf
}