From f69980e173df6c202e118a0cedd0bc028a470c6a Mon Sep 17 00:00:00 2001 From: wanxiangchwng Date: Sat, 23 Nov 2024 10:36:24 +0800 Subject: [PATCH] chore: fix some function names in comment Signed-off-by: wanxiangchwng --- api/coreservice.go | 2 +- ioctl/cmd/bc/bcbucketlist.go | 2 +- server/itx/nodestats/systemstats.go | 2 +- state/factory/factory.go | 2 +- state/factory/statedb.go | 2 +- state/factory/workingset.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/api/coreservice.go b/api/coreservice.go index 1625d55519..68f001faee 100644 --- a/api/coreservice.go +++ b/api/coreservice.go @@ -128,7 +128,7 @@ type ( ActionByActionHash(h hash.Hash256) (*action.SealedEnvelope, *block.Block, uint32, error) // PendingActionByActionHash returns action by action hash PendingActionByActionHash(h hash.Hash256) (*action.SealedEnvelope, error) - // ActPoolActions returns the all Transaction Identifiers in the actpool + // ActionsInActPool returns the all Transaction Identifiers in the actpool ActionsInActPool(actHashes []string) ([]*action.SealedEnvelope, error) // BlockByHeightRange returns blocks within the height range BlockByHeightRange(uint64, uint64) ([]*apitypes.BlockWithReceipts, error) diff --git a/ioctl/cmd/bc/bcbucketlist.go b/ioctl/cmd/bc/bcbucketlist.go index 9eee2531db..f5788d4680 100644 --- a/ioctl/cmd/bc/bcbucketlist.go +++ b/ioctl/cmd/bc/bcbucketlist.go @@ -110,7 +110,7 @@ func getBucketList(method, addr string, args ...string) (err error) { return output.NewError(output.InputError, "unknown ", nil) } -// getBucketList get bucket list from chain by voter address +// getBucketListByVoter get bucket list from chain by voter address func getBucketListByVoter(addr string, offset, limit uint32) error { address, err := util.GetAddress(addr) if err != nil { diff --git a/server/itx/nodestats/systemstats.go b/server/itx/nodestats/systemstats.go index 30d66cc5a9..c9f18615d2 100644 --- a/server/itx/nodestats/systemstats.go +++ b/server/itx/nodestats/systemstats.go @@ -17,7 +17,7 @@ type DiskStatus struct { Free uint64 `json:"Free"` } -// diskusage of path/disk +// diskUsage of path/disk func diskUsage(path string) (disk DiskStatus) { fs := syscall.Statfs_t{} err := syscall.Statfs(path, &fs) diff --git a/state/factory/factory.go b/state/factory/factory.go index edd913e16d..b7da3790fe 100644 --- a/state/factory/factory.go +++ b/state/factory/factory.go @@ -524,7 +524,7 @@ func (sf *factory) State(s interface{}, opts ...protocol.StateOption) (uint64, e return sf.currentChainHeight, state.Deserialize(s, value) } -// State returns a set states in the state factory +// States returns a set states in the state factory func (sf *factory) States(opts ...protocol.StateOption) (uint64, state.Iterator, error) { sf.mutex.RLock() defer sf.mutex.RUnlock() diff --git a/state/factory/statedb.go b/state/factory/statedb.go index 7da193a25f..e21ac871b4 100644 --- a/state/factory/statedb.go +++ b/state/factory/statedb.go @@ -338,7 +338,7 @@ func (sdb *stateDB) State(s interface{}, opts ...protocol.StateOption) (uint64, return sdb.currentChainHeight, sdb.state(cfg.Namespace, cfg.Key, s) } -// State returns a set of states in the state factory +// States returns a set of states in the state factory func (sdb *stateDB) States(opts ...protocol.StateOption) (uint64, state.Iterator, error) { cfg, err := processOptions(opts...) if err != nil { diff --git a/state/factory/workingset.go b/state/factory/workingset.go index 5359bd4a67..eae51cc961 100644 --- a/state/factory/workingset.go +++ b/state/factory/workingset.go @@ -419,7 +419,7 @@ func (ws *workingSet) Reset() { ws.dock.Reset() } -// createGenesisStates initialize the genesis states +// CreateGenesisStates initialize the genesis states func (ws *workingSet) CreateGenesisStates(ctx context.Context) error { if reg, ok := protocol.GetRegistry(ctx); ok { for _, p := range reg.All() {