From 3ce009b59a4a516216a6066af6f457dea8242523 Mon Sep 17 00:00:00 2001 From: Ivan Pushkin Date: Thu, 21 Dec 2023 18:42:08 +0100 Subject: [PATCH] core --- internal/core/core.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/core/core.go b/internal/core/core.go index eeb0605..e454878 100644 --- a/internal/core/core.go +++ b/internal/core/core.go @@ -106,6 +106,11 @@ func (c *Core) preloadState(ctx context.Context) { return } + if stateBotsNumber(state) > c.botsLimit { + log.WithField("bots_limit", c.botsLimit).Error("loaded state exceeds bots limit") + return + } + // Apply state log.Info("applying loaded state") c.applyState(ctx, state)