Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: raw_size in deal pipeline #369

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tasks/storage-market/storage_market.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package storage_market
import (
"bytes"
"context"
"database/sql"
"encoding/json"
"fmt"
"net/http"
Expand Down Expand Up @@ -74,7 +75,7 @@ type MK12Pipeline struct {
PieceCid string `db:"piece_cid"`
PieceSize abi.PaddedPieceSize `db:"piece_size"`
Offline bool `db:"offline"` // data is not downloaded before starting the deal
RawSize int64 `db:"raw_size"`
RawSize sql.NullInt64 `db:"raw_size"`
URL *string `db:"url"`
Headers json.RawMessage `db:"headers"`

Expand Down Expand Up @@ -691,7 +692,7 @@ func (d *CurioStorageDealMarket) ingestDeal(ctx context.Context, deal MK12Pipeli
}

var sp *abi.RegisteredSealProof
sector, sp, err = d.pin.AllocatePieceToSector(ctx, tx, maddr, pi, deal.RawSize, *dealUrl, headers)
sector, sp, err = d.pin.AllocatePieceToSector(ctx, tx, maddr, pi, deal.RawSize.Int64, *dealUrl, headers)
if err != nil {
return false, xerrors.Errorf("UUID: %s: failed to add deal to a sector: %w", deal.UUID, err)
}
Expand Down
Loading