config+rpcserver: hide deprecated option unsafe-disconnect
Also fix a case where this deprecated flag is used. We will always bypass the active channels check when `DisconnectPeer` because `!r.cfg.UnsafeDisconnect` is always false.
This commit is contained in:
2 files changed
+2
-3
No files matched your search
+1
-1
@@ -1747,7 +1747,7 @@ func (r *rpcServer) DisconnectPeer(ctx context.Context,
|
||||
// In order to avoid erroneously disconnecting from a peer that we have
|
||||
// an active channel with, if we have any channels active with this
|
||||
// peer, then we'll disallow disconnecting from them.
|
||||
if len(nodeChannels) > 0 && !r.cfg.UnsafeDisconnect {
|
||||
if len(nodeChannels) > 0 {
|
||||
return nil, fmt.Errorf("cannot disconnect from peer(%x), "+
|
||||
"all active channels with the peer need to be closed "+
|
||||
"first", pubKeyBytes)
|
||||
|
||||
Reference in new issue
Block a user