Skip to content

json2wal util bug #3146

@bradyjoestar

Description

@bradyjoestar

Currently we could use json2wal to convert the *.json to wal.File.

I found the the length of buffer of readline in json2wal is defalut

br := bufio.NewReader(f)

And the length of a line in json will exceed the defaultSize(4096) and report the following erros because the size of byte of BlockPart

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

BlockPartSizeBytes = 65536 // 64kB

I will use NewReaderSize(rd io.Reader, 70000) to fix this bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions