log whether node is a validator in each round

This commit is contained in:
Adrian Brink
2017-05-15 11:02:40 +02:00
committed by Ethan Buchman
parent e041b2eee6
commit eb9ca23250
3 changed files with 17 additions and 2 deletions

View File

@ -123,6 +123,13 @@ func NewNode(config *cfg.Config, privValidator *types.PrivValidator, clientCreat
}
}
// Log whether this node is a validator or an observer
if state.Validators.HasAddress(privValidator.Address) {
consensusLogger.Info("This node is a validator")
} else {
consensusLogger.Info("This node is not a validator")
}
// Make BlockchainReactor
bcReactor := bc.NewBlockchainReactor(state.Copy(), proxyApp.Consensus(), blockStore, fastSync)
bcReactor.SetLogger(logger.With("module", "blockchain"))