forked from TrueCloudLab/frostfs-node
[#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
|
@ -66,9 +66,9 @@ func (s *Server) startBlockTimers() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (s *Server) tickTimers() {
|
||||
func (s *Server) tickTimers(h uint32) {
|
||||
for i := range s.blockTimers {
|
||||
s.blockTimers[i].Tick()
|
||||
s.blockTimers[i].Tick(h)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue