Skip to content

Commit

Permalink
FSM connector ignores missing deal state (filecoin-project#4119)
Browse files Browse the repository at this point in the history
  • Loading branch information
anorth authored May 16, 2020
1 parent 4774140 commit 2a7f23c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion internal/app/go-filecoin/connectors/fsm_node/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,14 @@ func (f *FiniteStateMachineNodeConnector) StateMarketStorageDeal(ctx context.Con
if err != nil {
return market.DealProposal{}, market.DealState{}, err
} else if !found {
return market.DealProposal{}, market.DealState{}, fmt.Errorf("deal %d not found", dealID)
// The FSM actually ignores this value because it calls this before the sector is committed.
// But it can't tolerate returning an error here for not found.
// See https://github.com/filecoin-project/storage-fsm/issues/18
state = &market.DealState{
SectorStartEpoch: -1,
LastUpdatedEpoch: -1,
SlashEpoch: -1,
}
}

return deal, *state, err
Expand Down

0 comments on commit 2a7f23c

Please sign in to comment.