mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 14:40:51 +02:00
multi: add unsafedisconnect
as a dev config
This commit adds a new dev config `unsafedisconnect` as we sometimes want to disconnect nodes in our itests.
This commit is contained in:
11
lncfg/dev.go
11
lncfg/dev.go
@@ -24,6 +24,17 @@ 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 DefaultReservationTimeout
|
||||
|
Reference in New Issue
Block a user