[#280] ir: Add block timer unit tests

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-04-25 18:13:00 +03:00
parent 9d1320e243
commit 893c75cb59
2 changed files with 173 additions and 2 deletions

View file

@ -33,6 +33,10 @@ type (
newEpochHandler func()
containerEstimationStopper interface {
StopEstimation(p container.StopEstimationPrm) error
}
epochTimerArgs struct {
l *logger.Logger
@ -40,8 +44,8 @@ type (
newEpochHandlers []newEpochHandler
cnrWrapper *container.Client // to invoke stop container estimation
epoch epochState // to specify which epoch to stop, and epoch duration
cnrWrapper containerEstimationStopper // to invoke stop container estimation
epoch epochState // to specify which epoch to stop, and epoch duration
stopEstimationDMul uint32 // X: X/Y of epoch in blocks
stopEstimationDDiv uint32 // Y: X/Y of epoch in blocks