Skip to content

Commit

Permalink
Reflect changes to cbor-gen
Browse files Browse the repository at this point in the history
The dependency to cbor-gen includes a bug fix on how `readByteBuf`
handled errors. See:
- whyrusleeping/cbor-gen#60
  • Loading branch information
masih committed Mar 2, 2022
1 parent eb83001 commit 6bb5f26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion chain/store/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func recurseLinks(ctx context.Context, bs bstore.Blockstore, walked *cid.Set, ro
rerr = err
}
})
if err != nil {
if err != nil && err != io.EOF {
return nil, xerrors.Errorf("scanning for links failed: %w", err)
}

Expand Down
3 changes: 2 additions & 1 deletion chain/vm/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bytes"
"context"
"fmt"
"io"
"sync/atomic"
"time"

Expand Down Expand Up @@ -675,7 +676,7 @@ func linksForObj(blk block.Block, cb func(cid.Cid)) error {
switch blk.Cid().Prefix().Codec {
case cid.DagCBOR:
err := cbg.ScanForLinks(bytes.NewReader(blk.RawData()), cb)
if err != nil {
if err != nil && err != io.EOF {
return xerrors.Errorf("cbg.ScanForLinks: %w", err)
}
return nil
Expand Down

0 comments on commit 6bb5f26

Please sign in to comment.