mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-29 15:59:10 +01:00
getValidatedPeerWithMap get account from cache for exp
This commit is contained in:
@@ -1056,9 +1056,17 @@ func (am *DefaultAccountManager) getValidatedPeerWithMap(ctx context.Context, is
|
|||||||
return peer, emptyMap, nil, nil
|
return peer, emptyMap, nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
account, err := am.requestBuffer.GetAccountWithBackpressure(ctx, accountID)
|
var (
|
||||||
if err != nil {
|
account *types.Account
|
||||||
return nil, nil, nil, err
|
err error
|
||||||
|
)
|
||||||
|
if am.experimentalNetworkMap(accountID) {
|
||||||
|
account = am.getAccountFromHolderOrInit(accountID)
|
||||||
|
} else {
|
||||||
|
account, err = am.requestBuffer.GetAccountWithBackpressure(ctx, accountID)
|
||||||
|
if err != nil {
|
||||||
|
return nil, nil, nil, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
approvedPeersMap, err := am.integratedPeerValidator.GetValidatedPeers(ctx, account.Id, maps.Values(account.Groups), maps.Values(account.Peers), account.Settings.Extra)
|
approvedPeersMap, err := am.integratedPeerValidator.GetValidatedPeers(ctx, account.Id, maps.Values(account.Groups), maps.Values(account.Peers), account.Settings.Extra)
|
||||||
|
|||||||
Reference in New Issue
Block a user