Rename variable (#1829)

This commit is contained in:
Zoltan Papp 2024-04-11 14:08:03 +02:00 committed by GitHub
parent 704c67dec8
commit 9505805313
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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") 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) peerNotValid, isStatusChanged := am.integratedPeerValidator.IsNotValidPeer(account.Id, peer, account.GetPeerGroupsList(peer.ID), account.Settings.Extra)
if requiresApproval { if peerNotValid {
emptyMap := &NetworkMap{ emptyMap := &NetworkMap{
Network: account.Network.Copy(), Network: account.Network.Copy(),
} }
@ -563,11 +563,11 @@ func (am *DefaultAccountManager) SyncPeer(sync PeerSync) (*nbpeer.Peer, *Network
am.updateAccountPeers(account) am.updateAccountPeers(account)
} }
approvedPeersMap, err := am.GetValidatedPeers(account) validPeersMap, err := am.GetValidatedPeers(account)
if err != nil { if err != nil {
return nil, nil, err 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. // LoginPeer logs in or registers a peer.