[#486] innerring: Adopt disabled notary work flow

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-04-29 16:50:46 +03:00 committed by Alex Vanin
parent f2562e8c47
commit 5a167f3991
5 changed files with 111 additions and 68 deletions

View file

@ -26,6 +26,8 @@ type (
epochTimerArgs struct {
l *zap.Logger
notaryDisabled bool
nm *netmap.Processor // to handle new epoch tick
cnrWrapper *container.Wrapper // to invoke stop container estimation
@ -93,7 +95,14 @@ func newEpochTimer(args *epochTimerArgs) *timer.BlockTimer {
return
}
err := args.cnrWrapper.StopEstimationNotary(epochN - 1)
var err error
if args.notaryDisabled {
err = args.cnrWrapper.StopEstimation(epochN - 1)
} else {
err = args.cnrWrapper.StopEstimationNotary(epochN - 1)
}
if err != nil {
args.l.Warn("can't stop epoch estimation",
zap.Uint64("epoch", epochN),