[#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:
parent
c0e65dadaf
commit
4770cb8bf6
4 changed files with 68 additions and 8 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue