Fix bug, failing on decoding block parts.
package block
import (
+ "bufio"
"bytes"
"fmt"
"io"
@@ -817,6 +818,7 @@ func (m *manager) NewBlockFromReader(r io.Reader) (module.Block, error) {
}
func (m *manager) newBlockFromReader(r io.Reader) (module.Block, error) {
+ r = bufio.NewReader(r)
// TODO handle v1
var blockFormat blockV2Format
err := v2Codec.Unmarshal(r, &blockFormat.blockV2HeaderFormat)
