[#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 committed by Evgenii Stratonikov
parent e70f808dc3
commit 53693071de
2 changed files with 173 additions and 2 deletions

View file

@ -25,6 +25,10 @@ type (
newEpochHandler func()
containerEstimationStopper interface {
StopEstimation(p container.StopEstimationPrm) error
}
epochTimerArgs struct {
l *logger.Logger
@ -32,8 +36,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