From 135654a3b003519ce55fc9e91106adb707b654f9 Mon Sep 17 00:00:00 2001 From: welfuture Date: Sat, 15 Mar 2025 15:36:09 +0800 Subject: [PATCH] chore: make function comment match function name Signed-off-by: welfuture --- internal/graphql/resolvers/contract_sync.go | 2 +- internal/repository/block.go | 2 +- internal/repository/db/reward.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/graphql/resolvers/contract_sync.go b/internal/graphql/resolvers/contract_sync.go index da43682..20e23e6 100644 --- a/internal/graphql/resolvers/contract_sync.go +++ b/internal/graphql/resolvers/contract_sync.go @@ -51,7 +51,7 @@ func contractSyncInput(con *types.Contract) ContractValidationInput { return cInput } -// constructMutation creates the GraphQL mutation query string +// constructMutationPayload creates the GraphQL mutation query string // for the contract provided. func constructMutationPayload(con *types.Contract) (bytes.Buffer, error) { // prepare the payload diff --git a/internal/repository/block.go b/internal/repository/block.go index 4663494..3efa8ed 100644 --- a/internal/repository/block.go +++ b/internal/repository/block.go @@ -218,7 +218,7 @@ func (p *proxy) pullBlocks(num *uint64, count int32, toPull int32, current *type list.IsStart, list.IsEnd = checkBlocksListBoundary(count, next, list) } -// checkListBoundary verifies if the list of blocks is on one of the edges. +// checkBlocksListBoundary verifies if the list of blocks is on one of the edges. func checkBlocksListBoundary(count int32, next *types.Block, list *types.BlockList) (bool, bool) { return list.IsStart || (count < 0 && next == nil), list.IsEnd || (count > 0 && next == nil) } diff --git a/internal/repository/db/reward.go b/internal/repository/db/reward.go index 950cf2d..34ecfe6 100644 --- a/internal/repository/db/reward.go +++ b/internal/repository/db/reward.go @@ -59,7 +59,7 @@ func (db *MongoDbBridge) AddRewardClaim(rc *types.RewardClaim) error { return nil } -// isDelegationKnown checks if the given delegation exists in the database. +// isRewardClaimKnown checks if the given RewardClaim exists in the database. func (db *MongoDbBridge) isRewardClaimKnown(col *mongo.Collection, rc *types.RewardClaim) bool { // try to find the delegation in the database sr := col.FindOne(context.Background(), bson.D{