-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Open
Labels
Description
Description
In fabric-3.0.0/orderer/consensus/smartbft/synchronizer_bft.go, the debug log message contains an incorrect annotation. When the number of reported heights is insufficient (len(heights) < f+1), the log states it's returning heights[0] (the highest height), but the code actually returns heights[len(heights)-1] (the lowest available height).
func (s *BFTSynchronizer) computeTargetHeight(heights []uint64) uint64 {
// ...
if lenH < f+1 {
s.Logger.Debugf("Returning %d", heights[0])
return heights[int(lenH)-1]
}
// ...
}
Steps to reproduce
No response