2 Commits

Author SHA1 Message Date
Andrea Maria Piana
9e0b7c2fbc Set log to trace 2023-08-29 15:03:23 +01:00
Andrea Maria Piana
26d8e94130 Set SendEpoch instead of cumulating it
`CalculateNextEpoch` should set `SendEpoch` instead of cumulating it.
2020-11-24 07:01:06 +01:00

View File

@@ -182,7 +182,7 @@ func (n *Node) Start(duration time.Duration) {
n.logger.Info("Epoch processing stopped")
return
default:
n.logger.Debug("Epoch processing", zap.String("node", hex.EncodeToString(n.ID[:4])), zap.Int64("epoch", n.epoch))
n.logger.Trace("Epoch processing", zap.String("node", hex.EncodeToString(n.ID[:4])), zap.Int64("epoch", n.epoch))
time.Sleep(duration)
err := n.sendMessages()
if err != nil {
@@ -545,7 +545,7 @@ func (n *Node) insertSyncState(groupID *state.GroupID, messageID state.MessageID
func (n *Node) updateSendEpoch(s state.State) state.State {
s.SendCount += 1
s.SendEpoch += n.nextEpoch(s.SendCount, n.epoch)
s.SendEpoch = n.nextEpoch(s.SendCount, n.epoch)
return s
}