From 4e77f35f09f220cf10f2a1049ed5ee30a50f3541 Mon Sep 17 00:00:00 2001 From: riskrose Date: Mon, 10 Jun 2024 23:25:46 +0800 Subject: [PATCH] chore: make function comments match function names Signed-off-by: riskrose --- consensus/ibft/fork/fork.go | 2 +- consensus/ibft/fork/hooks.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/consensus/ibft/fork/fork.go b/consensus/ibft/fork/fork.go index 9d5695a680..a8f8865987 100644 --- a/consensus/ibft/fork/fork.go +++ b/consensus/ibft/fork/fork.go @@ -145,7 +145,7 @@ func GetIBFTForks(ibftConfig map[string]interface{}) (IBFTForks, error) { type IBFTForks []*IBFTFork -// getByFork returns the fork in which the given height is +// getFork returns the fork in which the given height is // it doesn't use binary search for now because number of IBFTFork is not so many func (fs *IBFTForks) getFork(height uint64) *IBFTFork { for idx := len(*fs) - 1; idx >= 0; idx-- { diff --git a/consensus/ibft/fork/hooks.go b/consensus/ibft/fork/hooks.go index 74d9435d3b..275ce7b9b7 100644 --- a/consensus/ibft/fork/hooks.go +++ b/consensus/ibft/fork/hooks.go @@ -62,7 +62,7 @@ func registerUpdateValidatorsHooks( } } -// registerPoSVerificationHooks registers that hooks to prevent the last epoch block from having transactions +// registerTxInclusionGuardHooks registers that hooks to prevent the last epoch block from having transactions func registerTxInclusionGuardHooks(hooks *hook.Hooks, epochSize uint64) { isLastEpoch := func(height uint64) bool { return height > 0 && height%epochSize == 0