[#324] ir: Measure epochs in sidechain blocks

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-01-22 18:01:44 +03:00 committed by Alex Vanin
parent b5dc28f79c
commit 19bb94cc04
8 changed files with 46 additions and 35 deletions

View file

@ -10,7 +10,12 @@ import (
// local epoch timer.
func (np *Processor) processNewEpoch(epoch uint64) {
np.epochState.SetEpochCounter(epoch)
np.epochTimer.ResetEpochTimer()
if err := np.epochTimer.ResetEpochTimer(); err != nil {
np.log.Warn("can't reset epoch timer",
zap.String("error", err.Error()))
return
}
// get new netmap snapshot
snapshot, err := invoke.NetmapSnapshot(np.morphClient, np.netmapContract)