diff --git a/carstore/sqlite_store.go b/carstore/sqlite_store.go index d04fa6dd..5fbf4bad 100644 --- a/carstore/sqlite_store.go +++ b/carstore/sqlite_store.go @@ -6,12 +6,13 @@ import ( "database/sql" "errors" "fmt" - "go.opentelemetry.io/otel/attribute" "io" "log/slog" "os" "path/filepath" + "go.opentelemetry.io/otel/attribute" + "github.com/bluesky-social/indigo/models" blockformat "github.com/ipfs/go-block-format" "github.com/ipfs/go-cid" @@ -470,7 +471,11 @@ func (sqs *SQLiteStore) getBlock(ctx context.Context, user models.Uid, bcid cid. if err != nil { return nil, fmt.Errorf("getb bad scan, %w", err) } - return blocks.NewBlock(blockb), nil + blk, err := blocks.NewBlockWithCid(blockb, bcid) + if err != nil { + return nil, fmt.Errorf("getb bad block, %w", err) + } + return blk, nil } return nil, ErrNothingThere }