From 628f62233f944f66fbcf82b48c5cce918f9f672b Mon Sep 17 00:00:00 2001 From: ianlv Date: Sat, 4 May 2024 12:31:42 +0800 Subject: [PATCH] chore: fix function names Signed-off-by: ianlv --- action/protocol/execution/evm/contract.go | 2 +- action/protocol/staking/protocol.go | 2 +- actpool/queueworker.go | 2 +- api/websocket.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/action/protocol/execution/evm/contract.go b/action/protocol/execution/evm/contract.go index d976e27692..2bbabc0d78 100644 --- a/action/protocol/execution/evm/contract.go +++ b/action/protocol/execution/evm/contract.go @@ -59,7 +59,7 @@ func (c *contract) Iterator() (trie.Iterator, error) { return mptrie.NewLeafIterator(c.trie) } -// GetState get the committed value of a key +// GetCommittedState get the committed value of a key func (c *contract) GetCommittedState(key hash.Hash256) ([]byte, error) { if v, ok := c.committed[key]; ok { return v, nil diff --git a/action/protocol/staking/protocol.go b/action/protocol/staking/protocol.go index 33e85d33df..ba49dc08ef 100644 --- a/action/protocol/staking/protocol.go +++ b/action/protocol/staking/protocol.go @@ -642,7 +642,7 @@ func (p *Protocol) calculateVoteWeight(v *VoteBucket, selfStake bool) *big.Int { return CalculateVoteWeight(p.config.VoteWeightCalConsts, v, selfStake) } -// settleAccount deposits gas fee and updates caller's nonce +// settleAction deposits gas fee and updates caller's nonce func (p *Protocol) settleAction( ctx context.Context, sm protocol.StateManager, diff --git a/actpool/queueworker.go b/actpool/queueworker.go index 3ccf3b3730..aa78871f6c 100644 --- a/actpool/queueworker.go +++ b/actpool/queueworker.go @@ -74,7 +74,7 @@ func (worker *queueWorker) Stop() error { return nil } -// Hanlde is called sequentially by worker +// Handle is called sequentially by worker func (worker *queueWorker) Handle(job workerJob) error { ctx := job.ctx // ctx is canceled or timeout diff --git a/api/websocket.go b/api/websocket.go index 25170bb3da..784f0982df 100644 --- a/api/websocket.go +++ b/api/websocket.go @@ -48,7 +48,7 @@ type safeWebsocketConn struct { mu sync.Mutex } -// WiteJSON writes a JSON message to the connection in a thread-safe way +// WriteJSON writes a JSON message to the connection in a thread-safe way func (c *safeWebsocketConn) WriteJSON(message interface{}) error { c.mu.Lock() defer c.mu.Unlock()