block/time: improve the test coverage for the BFT Time protocol #4174
Labels
P:tech-debt
Priority: Technical debt that needs to be paid off to enable us to move faster, reliably
state
testing
related to unit testing in general
The BFT Time protocol is responsible for assiging block times, and it is adopted in all release versions. From
v1.x
, it should be replaced by PBTS, but it is still supported and adopted by default (PBTS is enabled via a consensus parameter).The main method for the timestamp computation is
MedianTime
of thetypes.Commit
type. This method is not covered by any test unit in thetypes
package. It relies on theWeightedMedian
function from thetypes/time
package, which has a single test unit, that essentially hasn't changed at all from its introduction in tendermint/tendermint#2203.DoD
MedianTime
methodWeightedMedian
methodThe text was updated successfully, but these errors were encountered: