Fix hare algorithm logs
@@ -197,7 +197,7 @@ func (proc *ConsensusProcess) SetInbox(inbox chan *Msg) {
func (proc *ConsensusProcess) eventLoop() {
proc.With().Info("Consensus Process Started",
log.Int("Hare-N", proc.cfg.N), log.Int("f", proc.cfg.F), log.String("duration", (time.Duration(proc.cfg.RoundDuration)*time.Second).String()),
- log.Uint64("layer_id", uint64(proc.instanceId)), log.Int("exp_leaders", proc.cfg.ExpectedLeaders))
+ log.LayerId(uint64(proc.instanceId)), log.Int("exp_leaders", proc.cfg.ExpectedLeaders), log.String("set_values", proc.s.String()))
// set pre-round InnerMsg and send
builder, err := proc.initDefaultBuilder(proc.s)
@@ -525,7 +525,7 @@ func (proc *ConsensusProcess) processNotifyMsg(msg *Msg) {
// enough notifications, should terminate
proc.s = s // update to the agreed set
- proc.Event().Info("Consensus process terminated", log.Uint64("layer_id", uint64(proc.instanceId)))
+ proc.Event().Info("Consensus process terminated", log.String("set_values", proc.s.String()), log.LayerId(uint64(proc.instanceId)))
proc.terminationReport <- procOutput{proc.instanceId, proc.s}
proc.Close()
proc.terminating = true // ensures immediate termination
