sealing: Fix planOne for global events
This commit is contained in:
parent
1e877eae86
commit
052b090bbf
@ -63,9 +63,6 @@ func checkSeal(ctx context.Context, maddr address.Address, si *SectorInfo, api s
|
|||||||
return xerrors.Errorf("on chain CommD differs from sector: %x != %x", r.Return, si.CommD)
|
return xerrors.Errorf("on chain CommD differs from sector: %x != %x", r.Return, si.CommD)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Validate ticket
|
|
||||||
// TODO: Verify commp / commr / proof
|
|
||||||
// TODO: (StateCall PreCommit)
|
|
||||||
return nil
|
return nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -229,6 +229,11 @@ func planOne(ts ...func() (mut mutator, next api.SectorState)) func(events []sta
|
|||||||
return xerrors.Errorf("planner for state %s only has a plan for a single event only, got %+v", api.SectorStates[state.State], events)
|
return xerrors.Errorf("planner for state %s only has a plan for a single event only, got %+v", api.SectorStates[state.State], events)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if gm, ok := events[0].User.(globalMutator); !ok {
|
||||||
|
gm.applyGlobal(state)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
for _, t := range ts {
|
for _, t := range ts {
|
||||||
mut, next := t()
|
mut, next := t()
|
||||||
|
|
||||||
@ -245,6 +250,6 @@ func planOne(ts ...func() (mut mutator, next api.SectorState)) func(events []sta
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return xerrors.Errorf("planner for state %s received unexpected event %+v", api.SectorStates[state.State], events[0])
|
return xerrors.Errorf("planner for state %s received unexpected event %T (%+v)", api.SectorStates[state.State], events[0].User, events[0])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user