diff --git a/api/websocket/messagebuffer/messagebuffer.go b/api/websocket/messagebuffer/messagebuffer.go index 2bd2e0477..191047ce1 100644 --- a/api/websocket/messagebuffer/messagebuffer.go +++ b/api/websocket/messagebuffer/messagebuffer.go @@ -49,7 +49,7 @@ type MessageBuffer struct { seqId int64 // sequence id } -// comparation function of red and black tree +// compare function of red and black tree func compare(a, b interface{}) (res int) { aInt := a.(int64) bInt := b.(int64) diff --git a/consensus/proposal.go b/consensus/proposal.go index 207712360..5ac4a0aba 100644 --- a/consensus/proposal.go +++ b/consensus/proposal.go @@ -199,7 +199,7 @@ func (consensus *Consensus) waitAndHandleProposal() (*election.Election, error) } } -// startRequestProposal starts the request proposal routine +// startRequestingProposal starts the request proposal routine func (consensus *Consensus) startRequestingProposal() { for { requestProposal := <-consensus.requestProposalChan diff --git a/consensus/state.go b/consensus/state.go index 9704b74b9..0b175e30a 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -138,7 +138,7 @@ func (consensus *Consensus) getVotingNeighborsConsensusState() (map[string]*pb.G return states, nil } -// getNeighborsMajorConsensusHeight returns the majority of neighbors' nonzero +// getNeighborsMajorityConsensusState returns the majority of neighbors' nonzero // consensus height, ledger height, ledger block hash, or empty value if no // majority can be found func (consensus *Consensus) getNeighborsMajorityConsensusState() (uint32, uint32, common.Uint256) {