diff --git a/itests/worker_test.go b/itests/worker_test.go index e6c740dbe..42c7acdb8 100644 --- a/itests/worker_test.go +++ b/itests/worker_test.go @@ -399,7 +399,7 @@ func TestWindowPostWorkerDisconnected(t *testing.T) { sectors := 2 * 48 * 2 - client, miner, badWorker, ens := kit.EnsembleWorker(t, + _, miner, badWorker, ens := kit.EnsembleWorker(t, kit.PresealSectors(sectors), // 2 sectors per partition, 2 partitions in all 48 deadlines kit.LatestActorsAt(-1), kit.ThroughRPC(), @@ -408,14 +408,6 @@ func TestWindowPostWorkerDisconnected(t *testing.T) { var goodWorker kit.TestWorker ens.Worker(miner, &goodWorker, kit.WithTaskTypes([]sealtasks.TaskType{sealtasks.TTGenerateWindowPoSt}), kit.ThroughRPC()).Start() - maddr, err := miner.ActorAddress(ctx) - require.NoError(t, err) - - di, err := client.StateMinerProvingDeadline(ctx, maddr, types.EmptyTSK) - require.NoError(t, err) - - di = di.NextNotElapsed() - tryDl := func(dl uint64) { p, err := miner.ComputeWindowPoSt(ctx, dl, types.EmptyTSK) require.NoError(t, err) @@ -424,7 +416,7 @@ func TestWindowPostWorkerDisconnected(t *testing.T) { } tryDl(0) // this will run on the not-yet-bad badWorker - err = badWorker.Stop(ctx) + err := badWorker.Stop(ctx) require.NoError(t, err) tryDl(10) // will fail on the badWorker, then should retry on the goodWorker diff --git a/storage/sealer/sched_post.go b/storage/sealer/sched_post.go index aa96f8eb3..0e0c39768 100644 --- a/storage/sealer/sched_post.go +++ b/storage/sealer/sched_post.go @@ -3,14 +3,14 @@ package sealer import ( "context" "errors" - "github.com/filecoin-project/go-jsonrpc" - "github.com/hashicorp/go-multierror" "math/rand" "sync" "time" + "github.com/hashicorp/go-multierror" "golang.org/x/xerrors" + "github.com/filecoin-project/go-jsonrpc" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/lotus/storage/paths"