fix(markets): detect storage deal active correctly
Use SectorStartEpoch to determine if a deal is active, rather than Proposal.StartEpoch
This commit is contained in:
parent
cb09e48e8c
commit
c1979f2c7f
@ -234,7 +234,7 @@ func (c *ClientNodeAdapter) OnDealSectorCommitted(ctx context.Context, provider
|
||||
return false, false, xerrors.Errorf("failed to look up deal on chain: %w", err)
|
||||
}
|
||||
|
||||
if sd.Proposal.StartEpoch > 0 {
|
||||
if sd.State.SectorStartEpoch > 0 {
|
||||
cb(nil)
|
||||
return true, false, nil
|
||||
}
|
||||
@ -259,7 +259,7 @@ func (c *ClientNodeAdapter) OnDealSectorCommitted(ctx context.Context, provider
|
||||
return false, xerrors.Errorf("failed to look up deal on chain: %w", err)
|
||||
}
|
||||
|
||||
if sd.Proposal.StartEpoch == 0 {
|
||||
if sd.State.SectorStartEpoch < 1 {
|
||||
return false, xerrors.Errorf("deal wasn't active: deal=%d, parentState=%s, h=%d", dealId, ts.ParentState(), ts.Height())
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user