fix comments

pull/6/head
Minh Doan 7 years ago
parent 3a7f9eb46d
commit 271106289e
  1. 3
      consensus/consensus_leader.go

@ -14,6 +14,7 @@ import (
var mutex = &sync.Mutex{} var mutex = &sync.Mutex{}
// WaitForNewBlock waits for a new block.
func (consensus *Consensus) WaitForNewBlock(blockChannel chan blockchain.Block) { func (consensus *Consensus) WaitForNewBlock(blockChannel chan blockchain.Block) {
for { // keep waiting for new blocks for { // keep waiting for new blocks
newBlock := <-blockChannel newBlock := <-blockChannel
@ -24,7 +25,7 @@ func (consensus *Consensus) WaitForNewBlock(blockChannel chan blockchain.Block)
} }
} }
// Leader's consensus message dispatcher // ProcessMessageLeader is the leader's consensus message dispatcher
func (consensus *Consensus) ProcessMessageLeader(message []byte) { func (consensus *Consensus) ProcessMessageLeader(message []byte) {
msgType, err := GetConsensusMessageType(message) msgType, err := GetConsensusMessageType(message)
if err != nil { if err != nil {

Loading…
Cancel
Save