mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-21 17:01:35 +00:00
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:
committed by
Anton Kaliaev
parent
4d36647eea
commit
f5f1416a14
@ -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 {
|
||||
|
Reference in New Issue
Block a user