diff --git a/cli/server/server.go b/cli/server/server.go index 965e3fb2a..314f08217 100644 --- a/cli/server/server.go +++ b/cli/server/server.go @@ -193,7 +193,8 @@ func dumpDB(ctx *cli.Context) error { buf := io.NewBufBinWriter() b.EncodeBinary(buf.BinWriter) bytes := buf.Bytes() - writer.WriteVarBytes(bytes) + writer.WriteU32LE(uint32(len(bytes))) + writer.WriteBytes(bytes) if writer.Err != nil { return cli.NewExitError(err, 1) }