From 4eb83ea2e29759e622c1776ca62ea2313e1ff317 Mon Sep 17 00:00:00 2001 From: Cody Wang Date: Tue, 30 Apr 2024 22:33:47 -0400 Subject: [PATCH] fix --- op-node/rollup/derive/channel.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/op-node/rollup/derive/channel.go b/op-node/rollup/derive/channel.go index 8207f4c60c0a..e19723dfd5a0 100644 --- a/op-node/rollup/derive/channel.go +++ b/op-node/rollup/derive/channel.go @@ -175,7 +175,10 @@ func BatchReader(r io.Reader) (func() (*BatchData, error), error) { // If the bits equal to 2, then it is a brotli reader } else if compressionType[0]&0x0F == 2 { // remove the first byte by reading it - r.Read(make([]byte, 1)) + _, err := r.Read(make([]byte, 1)) + if err != nil { + return nil ,err + } reader = func(r io.Reader) (io.Reader, error) { return brotli.NewReader(r), nil }