From 9505805313137c5018839d633508c2b47e590525 Mon Sep 17 00:00:00 2001 From: Zoltan Papp Date: Thu, 11 Apr 2024 14:08:03 +0200 Subject: [PATCH] Rename variable (#1829) --- management/server/peer.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/management/server/peer.go b/management/server/peer.go index fda8e49e9cc..1448e301197 100644 --- a/management/server/peer.go +++ b/management/server/peer.go @@ -551,8 +551,8 @@ func (am *DefaultAccountManager) SyncPeer(sync PeerSync) (*nbpeer.Peer, *Network return nil, nil, status.Errorf(status.PermissionDenied, "peer login has expired, please log in once more") } - requiresApproval, isStatusChanged := am.integratedPeerValidator.IsNotValidPeer(account.Id, peer, account.GetPeerGroupsList(peer.ID), account.Settings.Extra) - if requiresApproval { + peerNotValid, isStatusChanged := am.integratedPeerValidator.IsNotValidPeer(account.Id, peer, account.GetPeerGroupsList(peer.ID), account.Settings.Extra) + if peerNotValid { emptyMap := &NetworkMap{ Network: account.Network.Copy(), } @@ -563,11 +563,11 @@ func (am *DefaultAccountManager) SyncPeer(sync PeerSync) (*nbpeer.Peer, *Network am.updateAccountPeers(account) } - approvedPeersMap, err := am.GetValidatedPeers(account) + validPeersMap, err := am.GetValidatedPeers(account) if err != nil { return nil, nil, err } - return peer, account.GetPeerNetworkMap(peer.ID, am.dnsDomain, approvedPeersMap), nil + return peer, account.GetPeerNetworkMap(peer.ID, am.dnsDomain, validPeersMap), nil } // LoginPeer logs in or registers a peer.