This commit is contained in:
Łukasz Magiera 2020-09-17 00:35:30 +02:00
parent d9d644b27f
commit 17680fff55
4 changed files with 8 additions and 7 deletions

View File

@ -211,7 +211,7 @@ Response:
```json
{
"Version": "string value",
"APIVersion": 3840,
"APIVersion": 3584,
"BlockDelay": 42
}
```

View File

@ -72,8 +72,8 @@ type Manager struct {
storage.Prover
workLk sync.Mutex
work *statestore.StateStore
workLk sync.Mutex
work *statestore.StateStore
callToWork map[storiface.CallID]WorkID
// used when we get an early return and there's no callToWork mapping

View File

@ -23,6 +23,7 @@ func (w WorkID) String() string {
var _ fmt.Stringer = &WorkID{}
type WorkStatus string
const (
wsStarted WorkStatus = "started" // task started, not scheduled/running on a worker yet
wsRunning WorkStatus = "running" // task running on a worker, waiting for worker return
@ -35,7 +36,7 @@ type WorkState struct {
Status WorkStatus
WorkerCall storiface.CallID // Set when entering wsRunning
WorkError string // Status = wsDone, set when failed to start work
WorkError string // Status = wsDone, set when failed to start work
}
func newWorkID(method string, params ...interface{}) (WorkID, error) {
@ -198,7 +199,7 @@ func (m *Manager) waitWork(ctx context.Context, wid WorkID) (interface{}, error)
log.Errorf("marking work as done: %+v", err)
}
res := <- cr
res := <-cr
delete(m.callRes, ws.WorkerCall)
m.workLk.Unlock()

View File

@ -24,8 +24,8 @@ type testWorker struct {
mockSeal *mock.SectorMgr
pc1s int
pc1lk sync.Mutex
pc1s int
pc1lk sync.Mutex
pc1wait *sync.WaitGroup
}