From fe660580a4d0fe974b19a0715efce93a0fc76a5d Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Tue, 2 Feb 2016 23:05:24 -0500 Subject: [PATCH] catchup replay fix --- consensus/replay.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/consensus/replay.go b/consensus/replay.go index 2de357b2..aa06d468 100644 --- a/consensus/replay.go +++ b/consensus/replay.go @@ -24,7 +24,7 @@ func (cs *ConsensusState) readReplayMessage(msgBytes []byte, newStepCh chan inte var msg ConsensusLogMessage wire.ReadJSON(&msg, msgBytes, &err) if err != nil { - fmt.Println(string(msgBytes)) + fmt.Println("MsgBytes:", msgBytes, string(msgBytes)) return fmt.Errorf("Error reading json data: %v", err) } @@ -127,6 +127,8 @@ func (cs *ConsensusState) catchupReplay(height int) error { return err } else if len(msgBytes) == 0 { continue + } else if len(msgBytes) == 1 && msgBytes[0] == '\n' { + continue } // the first msg is (usually) the NewHeight event, so we can ignore it if !beginning && i == 1 {