From 9ad49bc2c1aa4e378daaa1a6c9abf9156bbcb415 Mon Sep 17 00:00:00 2001 From: billettc Date: Tue, 3 Oct 2023 14:10:40 -0400 Subject: [PATCH] fix dbin header --- accountresolver/bundlerreader.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accountresolver/bundlerreader.go b/accountresolver/bundlerreader.go index 1ab138d4..de0beb78 100644 --- a/accountresolver/bundlerreader.go +++ b/accountresolver/bundlerreader.go @@ -56,7 +56,7 @@ func (r *BundleReader) PushBlock(block *bstream.Block) error { } if !r.headerWritten { - header := data[:bstream.GetBlockWriterHeaderLen] + header := []byte{'d', 'b', 'i', 'n', byte(0), 's', 'o', 'l', 0, 1} r.blockData <- header r.headerWritten = true } @@ -113,7 +113,7 @@ func (r *BundleReader) fillBuffer() error { return fmt.Errorf("one-block-file corrupt: expected header size of %d, but file size is only %d bytes", bstream.GetBlockWriterHeaderLen, len(data)) } - data = data[:bstream.GetBlockWriterHeaderLen] + data = data[bstream.GetBlockWriterHeaderLen:] r.readBuffer = data r.readBufferOffset = 0 return nil