[#446] innerring: Use alphabet state in processors

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-03-23 18:20:44 +03:00 committed by Alex Vanin
parent 1332db883e
commit e05f1e1394
17 changed files with 80 additions and 69 deletions

View file

@ -14,8 +14,8 @@ import (
// Process add peer notification by sanity check of new node
// local epoch timer.
func (np *Processor) processAddPeer(node []byte) {
if !np.activeState.IsActive() {
np.log.Info("passive mode, ignore new peer notification")
if !np.alphabetState.IsAlphabet() {
np.log.Info("non alphabet mode, ignore new peer notification")
return
}
@ -74,8 +74,8 @@ func (np *Processor) processAddPeer(node []byte) {
// Process update peer notification by sending approval tx to the smart contract.
func (np *Processor) processUpdatePeer(ev netmapEvent.UpdatePeer) {
if !np.activeState.IsActive() {
np.log.Info("passive mode, ignore new epoch tick")
if !np.alphabetState.IsAlphabet() {
np.log.Info("non alphabet mode, ignore update peer notification")
return
}