Skip to content

Commit

Permalink
fix: CAR encode with empty roots
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Shaw committed Dec 11, 2023
1 parent 55806bb commit aa68249
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/car/car.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const ContentType = "application/vnd.ipld.car"
func Encode(roots []ipld.Link, blocks iterable.Iterator[ipld.Block]) io.Reader {
reader, writer := io.Pipe()
go func() {
var cids []cid.Cid
cids := []cid.Cid{}
for _, r := range roots {
_, cid, err := cid.CidFromBytes([]byte(r.Binary()))
if err != nil {
Expand Down

0 comments on commit aa68249

Please sign in to comment.