Skip to content

Commit

Permalink
rpcsrv: set MaxFindResultItems to default if not specified
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Shaleva <[email protected]>
  • Loading branch information
AnnaShaleva committed Aug 29, 2023
1 parent 7e4751d commit 6ea2605
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/services/rpcsrv/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ func New(chain Ledger, conf config.RPC, coreServer *network.Server,
log.Info("MaxIteratorResultItems is not set or wrong, setting default value", zap.Int("MaxIteratorResultItems", config.DefaultMaxIteratorResultItems))
}
}
if conf.MaxFindResultItems <= 0 {
conf.MaxFindResultItems = config.DefaultMaxFindStorageResultItems
log.Info("MaxFindResultItems is not set or wrong, setting default value", zap.Int("MaxFindResultItems", config.DefaultMaxFindStorageResultItems))
}
if conf.MaxWebSocketClients == 0 {
conf.MaxWebSocketClients = defaultMaxWebSocketClients
log.Info("MaxWebSocketClients is not set or wrong, setting default value", zap.Int("MaxWebSocketClients", defaultMaxWebSocketClients))
Expand Down

0 comments on commit 6ea2605

Please sign in to comment.