json2wal: increase reader's buffer size (#3147)

```
panic: failed to unmarshal json: unexpected end of JSON input

goroutine 1 [running]:
main.main()
	/root/gelgo/src/github.com/tendermint/tendermint/scripts/json2wal/main.go:66 +0x73f
```

Closes #3146
This commit is contained in:
bradyjoestar
2019-01-18 16:09:12 +08:00
committed by Anton Kaliaev
parent 4d36647eea
commit f5f1416a14

View File

@ -45,7 +45,10 @@ func main() {
}
defer walFile.Close()
br := bufio.NewReader(f)
// the length of tendermint/wal/MsgInfo in the wal.json may exceed the defaultBufSize(4096) of bufio
// because of the byte array in BlockPart
// leading to unmarshal error: unexpected end of JSON input
br := bufio.NewReaderSize(f, 2*types.BlockPartSizeBytes)
dec := cs.NewWALEncoder(walFile)
for {