From b33e47cfd61470cd0d2fe31092453620c6566da1 Mon Sep 17 00:00:00 2001 From: Tobeyw Date: Fri, 16 Aug 2024 15:58:13 +0800 Subject: [PATCH] fix maxLimit --- neo3fura_http/biz/job/job.GetHoldersByContractHash.go | 2 ++ neo3fura_http/lib/type/consts/src.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/neo3fura_http/biz/job/job.GetHoldersByContractHash.go b/neo3fura_http/biz/job/job.GetHoldersByContractHash.go index 63508393..98811dda 100644 --- a/neo3fura_http/biz/job/job.GetHoldersByContractHash.go +++ b/neo3fura_http/biz/job/job.GetHoldersByContractHash.go @@ -2,6 +2,7 @@ package job import ( "encoding/json" + "go.mongodb.org/mongo-driver/bson" ) @@ -42,6 +43,7 @@ func (me T) GetHoldersByContractHash() error { Sort: bson.M{"balance": -1}, Filter: bson.M{"asset": item["hash"], "balance": bson.M{"$gt": 0}}, Query: []string{}, + Limit: int64(1000), }, ret) if err != nil { return err diff --git a/neo3fura_http/lib/type/consts/src.go b/neo3fura_http/lib/type/consts/src.go index 105e789b..98d20bc7 100644 --- a/neo3fura_http/lib/type/consts/src.go +++ b/neo3fura_http/lib/type/consts/src.go @@ -7,5 +7,5 @@ const ( NEO = "0xef4073a0f2b305a38ec4050e4d3d28bc40ea63f5" GAS = "0xd2a4cff31913016155e38e474a2c06d08be276cf" DefaultLimit = 20 - MaxLimit = 500 + MaxLimit = 1000 )