Skip to content

Commit

Permalink
fix: snap: Correctly handle non-filplus deals (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
magik6k authored Oct 16, 2024
1 parent 5c1c70b commit 959ada5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions market/deal_ingest_snap.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
)

const IdealEndEpochBuffer = 2 * builtin.EpochsInDay
const MaxEndEpochBufferUnverified = 180 * builtin.EpochsInDay

// assuming that snap takes up to 20min to get to submitting the message we want to avoid sectors from deadlines which will
// become immutable in the next 20min (40 epochs)
Expand Down Expand Up @@ -264,6 +265,8 @@ func (p *PieceIngesterSnap) AllocatePieceToSector(ctx context.Context, maddr add
vd.tmax = alloc.TermMax

maxExpiration = int64(head.Height() + alloc.TermMax)
} else {
maxExpiration = int64(piece.DealSchedule.EndEpoch) + MaxEndEpochBufferUnverified
}
propJson, err = json.Marshal(piece.PieceActivationManifest)
if err != nil {
Expand Down

0 comments on commit 959ada5

Please sign in to comment.