Skip to content

Commit

Permalink
fix dbin header
Browse files Browse the repository at this point in the history
  • Loading branch information
billettc committed Oct 3, 2023
1 parent 626bab9 commit 9ad49bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions accountresolver/bundlerreader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9ad49bc

Please sign in to comment.