forked from TrueCloudLab/frostfs-node
[#248] innerring: Remove audit and settlement code
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
8b2aae73c6
commit
8879c6ea4a
36 changed files with 8 additions and 3008 deletions
|
@ -5,10 +5,8 @@ import (
|
|||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/processors/alphabet"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/processors/settlement"
|
||||
timerEvent "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/timers"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client/container"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/event"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/timer"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||
|
@ -25,12 +23,6 @@ type (
|
|||
IsAlphabet() bool
|
||||
}
|
||||
|
||||
subEpochEventHandler struct {
|
||||
handler event.Handler // handle to execute
|
||||
durationMul uint32 // X: X/Y of epoch in blocks
|
||||
durationDiv uint32 // Y: X/Y of epoch in blocks
|
||||
}
|
||||
|
||||
newEpochHandler func()
|
||||
|
||||
epochTimerArgs struct {
|
||||
|
@ -45,9 +37,6 @@ type (
|
|||
|
||||
stopEstimationDMul uint32 // X: X/Y of epoch in blocks
|
||||
stopEstimationDDiv uint32 // Y: X/Y of epoch in blocks
|
||||
|
||||
collectBasicIncome subEpochEventHandler
|
||||
distributeBasicIncome subEpochEventHandler
|
||||
}
|
||||
|
||||
emitTimerArgs struct {
|
||||
|
@ -119,34 +108,6 @@ func newEpochTimer(args *epochTimerArgs) *timer.BlockTimer {
|
|||
}
|
||||
})
|
||||
|
||||
epochTimer.OnDelta(
|
||||
args.collectBasicIncome.durationMul,
|
||||
args.collectBasicIncome.durationDiv,
|
||||
func() {
|
||||
epochN := args.epoch.EpochCounter()
|
||||
if epochN == 0 { // estimates are invalid in genesis epoch
|
||||
return
|
||||
}
|
||||
|
||||
args.collectBasicIncome.handler(
|
||||
settlement.NewBasicIncomeCollectEvent(epochN - 1),
|
||||
)
|
||||
})
|
||||
|
||||
epochTimer.OnDelta(
|
||||
args.distributeBasicIncome.durationMul,
|
||||
args.distributeBasicIncome.durationDiv,
|
||||
func() {
|
||||
epochN := args.epoch.EpochCounter()
|
||||
if epochN == 0 { // estimates are invalid in genesis epoch
|
||||
return
|
||||
}
|
||||
|
||||
args.distributeBasicIncome.handler(
|
||||
settlement.NewBasicIncomeDistributeEvent(epochN - 1),
|
||||
)
|
||||
})
|
||||
|
||||
return epochTimer
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue