fix comments

pull/3374/head
Rongjian Lan 4 years ago
parent 1851d7eea5
commit 97063591df
  1. 1
      consensus/consensus_v2.go
  2. 2
      consensus/fbft_log.go
  3. 2
      consensus/view_change_construct.go

@ -522,6 +522,7 @@ func (consensus *Consensus) commitBlock(blk *types.Block, committedMsg *FBFTMess
}
if !committedMsg.HasSingleSender() {
consensus.getLogger().Error().Msg("[TryCatchup] Leader message can not have multiple sender keys")
return errIncorrectSender
}
atomic.AddUint64(&consensus.blockNum, 1)

@ -90,6 +90,8 @@ func (m *FBFTMessage) id() fbftMsgID {
if m.HasSingleSender() {
copy(id[idTypeBytes+idViewIDBytes+idHashBytes:], m.SenderPubkeys[0].Bytes[:])
} else {
// Currently this case is not reachable as only validator will use id() func
// and validator won't receive message with multiple senders
copy(id[idTypeBytes+idViewIDBytes+idHashBytes:], m.SenderPubkeyBitmap[:])
}
return id

@ -241,7 +241,7 @@ var (
errVerifyM2 = errors.New("failed to verfiy signature for M2 message")
errM1Payload = errors.New("failed to verify multi signature for M1 prepared payload")
errNoQuorum = errors.New("no quorum on M1 (prepared) payload")
errIncorrectSender = errors.New("view change msg must have only one sender")
errIncorrectSender = errors.New("multiple senders not allowed")
)
// ProcessViewChangeMsg process the view change message after verification

Loading…
Cancel
Save