From f41a2b761c8d1c1243c2f38cb1be0a2f853386e2 Mon Sep 17 00:00:00 2001 From: slicesequal Date: Wed, 3 Sep 2025 16:26:12 +0800 Subject: [PATCH] chore: remove redundant words in comment Signed-off-by: slicesequal --- internal/graphql/resolvers/sfc_epochs.go | 2 +- internal/graphql/resolvers/trx_flow.go | 2 +- internal/repository/cache/ring/ring.go | 5 +---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/internal/graphql/resolvers/sfc_epochs.go b/internal/graphql/resolvers/sfc_epochs.go index d21f6905..bb3acff1 100644 --- a/internal/graphql/resolvers/sfc_epochs.go +++ b/internal/graphql/resolvers/sfc_epochs.go @@ -11,7 +11,7 @@ type EpochList struct { types.EpochList } -// EpochListEdge represents a single edge of an epoch list list structure. +// EpochListEdge represents a single edge of an epoch list structure. type EpochListEdge struct { Epoch *Epoch } diff --git a/internal/graphql/resolvers/trx_flow.go b/internal/graphql/resolvers/trx_flow.go index a907cf87..186296d4 100644 --- a/internal/graphql/resolvers/trx_flow.go +++ b/internal/graphql/resolvers/trx_flow.go @@ -43,7 +43,7 @@ func (rs *rootResolver) TrxVolume(args struct { return list, nil } -// TrxGasSpeed resolves the gas consumption speed speed +// TrxGasSpeed resolves the gas consumption speed // of the network in transactions processed per second. func (rs *rootResolver) TrxGasSpeed(args struct { Range int32 diff --git a/internal/repository/cache/ring/ring.go b/internal/repository/cache/ring/ring.go index 58fb2165..5392893a 100644 --- a/internal/repository/cache/ring/ring.go +++ b/internal/repository/cache/ring/ring.go @@ -67,10 +67,7 @@ func (r *Ring) List(length int) []unsafe.Pointer { defer r.RUnlock() // make sure to limit the pulled range to the ring depth - tl := length - if tl > r.depth { - tl = r.depth - } + tl := min(length, r.depth) l := make([]unsafe.Pointer, tl)