Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions manager/gateway/cosmos_agregated2.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,11 @@ func (g *CosmosGateway) blocks(req types.InboundRequest) (*types.BlocksResultRes
}

options := &adapter.Options{
Count: 1,
Limit: int64(request.Limit),
Skip: int64(request.Offset),
Sort: sortMap,
Count: 1,
Limit: int64(request.Limit),
Skip: int64(request.Offset),
Sort: sortMap,
NumericOrdering: true,
}

if request.Height != "" {
Expand Down
4 changes: 2 additions & 2 deletions manager/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ toolchain go1.24.2

require (
github.com/KeisukeYamashita/go-jsonrpc v1.0.1
github.com/KiraCore/sai-service v1.0.5
github.com/KiraCore/sai-storage-mongo v1.1.9
github.com/KiraCore/sekai v0.4.13
github.com/cometbft/cometbft v0.37.2
github.com/cosmos/cosmos-proto v1.0.0-beta.2
Expand All @@ -14,8 +16,6 @@ require (
github.com/gogo/protobuf v1.3.2
github.com/google/uuid v1.6.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2
github.com/KiraCore/sai-service v1.0.5
github.com/KiraCore/sai-storage-mongo v1.1.4
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible
github.com/spf13/cast v1.5.0
go.mongodb.org/mongo-driver v1.17.3
Expand Down
10 changes: 4 additions & 6 deletions manager/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
github.com/KeisukeYamashita/go-jsonrpc v1.0.1 h1:mkg8th2I7C1y3tnAsxroQbmQcXEZ22AkQ5pazRd/KDM=
github.com/KeisukeYamashita/go-jsonrpc v1.0.1/go.mod h1:NyiYd1oDwaSsIflCju5dKRvLdG5rZ/I4E07ygRYYmgc=
github.com/KiraCore/sai-service v1.0.5 h1:AZQof+UGMNeZmnoHBHSOoVDW3SjZTkjw3qmh5xl5CMc=
github.com/KiraCore/sai-service v1.0.5/go.mod h1:WDUOx/Eb4K6mFwp2mKNT3c25q/MqakvcWxWkY2MDaxQ=
github.com/KiraCore/sai-storage-mongo v1.1.9 h1:hVPge433R6ub20GaTgz8RFzFiYxdYzO8euakXjZUZM8=
github.com/KiraCore/sai-storage-mongo v1.1.9/go.mod h1:qtfzydkxN6LLAoBDjoxwaF1RMtuwIqkVhCDNlQO2Vi0=
github.com/KiraCore/sekai v0.4.13 h1:WGRyV+OTK/qIO9o/yvIyFaXDSRsFrP0ja1YKUexLspc=
github.com/KiraCore/sekai v0.4.13/go.mod h1:G9WTP5pUebDPMa699uKjvQZ+lyLt9iRNdaLd9N1PuMg=
github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE=
Expand Down Expand Up @@ -499,12 +503,6 @@ github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiS
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/saiset-co/sai-interx-manager v1.0.0 h1:dvLGK3pckjFSvutJO9OUDu6LUBmx/ZCrR504Q1qxxd0=
github.com/saiset-co/sai-interx-manager v1.0.0/go.mod h1:mmShNmvf9xYysd5tmLfKnYFJ1VpWG8YuzNUV4BKOFvU=
github.com/saiset-co/sai-service v1.0.5 h1:gYuzy/ZycSkzj1/PfLAzCneHFMOL/NuSGvR+mz5i7jU=
github.com/saiset-co/sai-service v1.0.5/go.mod h1:BhcyROqAW7OnZmhiL0dWhM38AjWuI6uxfcRit7eQnyo=
github.com/saiset-co/sai-storage-mongo v1.1.4 h1:77AXGhGvqaSi7S7UzZIfa4YnH23C1sBe93mtwg38BDA=
github.com/saiset-co/sai-storage-mongo v1.1.4/go.mod h1:QDSkABdAKSfsEWnz/R6RWcy3Vd3Oltdtb+AhLE1zTZA=
github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0=
github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM=
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU=
Expand Down
9 changes: 7 additions & 2 deletions worker/sai-storage-mongo/mongo/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,13 @@ func (c Client) Find(collectionName string, selector map[string]interface{}, inp
requestOptions.SetProjection(projection)
}

if inputOptions.NumericOrdering {
requestOptions.Collation.NumericOrdering = true
if inputOptions != nil && inputOptions.NumericOrdering {
collation := &options.Collation{
Locale: "en_US",
NumericOrdering: true,
}

requestOptions.SetCollation(collation)
}

collection := c.GetCollection(collectionName)
Expand Down
Loading