forked from TrueCloudLab/frostfs-node
[#478] innerring: Use dynamic epoch duration in epoch timer
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
c33512d976
commit
dc0bd782d2
3 changed files with 19 additions and 5 deletions
|
@ -29,9 +29,9 @@ type (
|
|||
cnrWrapper *container.Wrapper // to invoke stop container estimation
|
||||
epoch epochState // to specify which epoch to stop
|
||||
|
||||
epochDuration uint32 // in blocks
|
||||
stopEstimationDMul uint32 // X: X/Y of epoch in blocks
|
||||
stopEstimationDDiv uint32 // Y: X/Y of epoch in blocks
|
||||
epochDuration timers.BlockMeter // in blocks
|
||||
stopEstimationDMul uint32 // X: X/Y of epoch in blocks
|
||||
stopEstimationDDiv uint32 // Y: X/Y of epoch in blocks
|
||||
|
||||
collectBasicIncome subEpochEventHandler
|
||||
distributeBasicIncome subEpochEventHandler
|
||||
|
@ -74,7 +74,7 @@ func (s *Server) tickTimers() {
|
|||
|
||||
func newEpochTimer(args *epochTimerArgs) *timers.BlockTimer {
|
||||
epochTimer := timers.NewBlockTimer(
|
||||
timers.StaticBlockMeter(args.epochDuration),
|
||||
args.epochDuration,
|
||||
func() {
|
||||
args.nm.HandleNewEpochTick(timers.NewEpochTick{})
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue