mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-05 04:55:18 +00:00
@@ -52,19 +52,19 @@ func main() {
|
||||
dec := cs.NewWALEncoder(walFile)
|
||||
|
||||
for {
|
||||
msgJson, _, err := br.ReadLine()
|
||||
msgJSON, _, err := br.ReadLine()
|
||||
if err == io.EOF {
|
||||
break
|
||||
} else if err != nil {
|
||||
panic(fmt.Errorf("failed to read file: %v", err))
|
||||
}
|
||||
// ignore the ENDHEIGHT in json.File
|
||||
if strings.HasPrefix(string(msgJson), "ENDHEIGHT") {
|
||||
if strings.HasPrefix(string(msgJSON), "ENDHEIGHT") {
|
||||
continue
|
||||
}
|
||||
|
||||
var msg cs.TimedWALMessage
|
||||
err = cdc.UnmarshalJSON(msgJson, &msg)
|
||||
err = cdc.UnmarshalJSON(msgJSON, &msg)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("failed to unmarshal json: %v", err))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user