[#1208] innerring: Disallow to tick timer twice on the same height

Provide current heights as an argument to ticker.
Zero height disables any checks, thus corresponding to the old
behaviour. If non-zero height is used, ignore the tick if the height
is less than the timer tick state.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-03-30 13:16:41 +03:00 committed by Alex Vanin
parent c0e65dadaf
commit 4770cb8bf6
4 changed files with 68 additions and 8 deletions

View file

@ -241,7 +241,7 @@ func (s *Server) Start(ctx context.Context, intError chan<- error) (err error) {
zap.Uint32("block_index", b.Index))
}
s.tickTimers()
s.tickTimers(b.Index)
})
if !s.withoutMainNet {