Commit graph

4 commits

Author SHA1 Message Date
Alex Vanin
376bb293b4 [#479] morph/timer: Move block timer to morph package
Block timer is going to be reused in storage node to tick
EigenTrust calculation rounds.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-04-19 09:35:54 +03:00
Leonard Lyubich
f7a9e43165 [#356] ir/blocktimer: Fix reset behavior
In previous implementation handler was not called more the one time after
Reset. It was caused by tick counter not being reset inside Reset method.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-01-29 11:04:30 +03:00
Leonard Lyubich
b5dc28f79c [#324] ir/timers: Complicate the logic of fractional block intervals
Call handler of the fractional block interval once between base interval
ticks by default. Add option to call handler of fractional block interval
multiple times (N times if fractional interval == BASE_INTERVAL / N).

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-01-29 11:04:30 +03:00
Leonard Lyubich
476349dd1c [#324] ir/timers: Implement chain block timer
Implement a timer that can tick chain blocks and perform actions at time
intervals in the blocks.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-01-29 11:04:30 +03:00