Skip to content

Commit

Permalink
tidy and gen
Browse files Browse the repository at this point in the history
  • Loading branch information
jennijuju committed Apr 12, 2022
1 parent 656a338 commit f508d1e
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 81 deletions.
4 changes: 0 additions & 4 deletions documentation/en/cli-lotus-miner.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ USAGE:
lotus-miner [global options] command [command options] [arguments...]
VERSION:
<<<<<<< HEAD
1.15.2-dev
=======
1.15.1
>>>>>>> releases
COMMANDS:
init Initialize a lotus miner repo
Expand Down
4 changes: 0 additions & 4 deletions documentation/en/cli-lotus-worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ USAGE:
lotus-worker [global options] command [command options] [arguments...]
VERSION:
<<<<<<< HEAD
1.15.2-dev
=======
1.15.1
>>>>>>> releases
COMMANDS:
run Start lotus worker
Expand Down
4 changes: 0 additions & 4 deletions documentation/en/cli-lotus.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ USAGE:
lotus [global options] command [command options] [arguments...]
VERSION:
<<<<<<< HEAD
1.15.2-dev
=======
1.15.1
>>>>>>> releases
COMMANDS:
daemon Start a lotus daemon process
Expand Down
Empty file removed export
Empty file.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ require (
github.com/filecoin-project/go-commp-utils v0.1.3
github.com/filecoin-project/go-crypto v0.0.1
github.com/filecoin-project/go-data-transfer v1.15.1
github.com/filecoin-project/go-ds-versioning v0.1.1
github.com/filecoin-project/go-fil-commcid v0.1.0
github.com/filecoin-project/go-fil-commp-hashhash v0.1.0
github.com/filecoin-project/go-fil-markets v1.20.1
Expand Down
68 changes: 0 additions & 68 deletions itests/ccupgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/chain/types"
sealing "github.com/filecoin-project/lotus/extern/storage-sealing"
"github.com/filecoin-project/lotus/itests/kit"
)

Expand Down Expand Up @@ -140,69 +138,3 @@ func TestCCUpgradeAndPoSt(t *testing.T) {
})
})
}

func TestAbortUpgradeAvailable(t *testing.T) {
kit.QuietMiningLogs()

ctx := context.Background()
blockTime := 1 * time.Millisecond

client, miner, ens := kit.EnsembleMinimal(t, kit.GenesisNetworkVersion(network.Version15), kit.ThroughRPC())
ens.InterconnectAll().BeginMiningMustPost(blockTime)

maddr, err := miner.ActorAddress(ctx)
if err != nil {
t.Fatal(err)
}

CCUpgrade := abi.SectorNumber(kit.DefaultPresealsPerBootstrapMiner + 1)
fmt.Printf("CCUpgrade: %d\n", CCUpgrade)

miner.PledgeSectors(ctx, 1, 0, nil)
sl, err := miner.SectorsList(ctx)
require.NoError(t, err)
require.Len(t, sl, 1, "expected 1 sector")
require.Equal(t, CCUpgrade, sl[0], "unexpected sector number")
{
si, err := client.StateSectorGetInfo(ctx, maddr, CCUpgrade, types.EmptyTSK)
require.NoError(t, err)
require.Less(t, 50000, int(si.Expiration))
}
waitForSectorActive(ctx, t, CCUpgrade, client, maddr)

err = miner.SectorMarkForUpgrade(ctx, sl[0], true)
require.NoError(t, err)

sl, err = miner.SectorsList(ctx)
require.NoError(t, err)
require.Len(t, sl, 1, "expected 1 sector")

ss, err := miner.SectorsStatus(ctx, sl[0], false)
require.NoError(t, err)

for i := 0; i < 100; i++ {
ss, err = miner.SectorsStatus(ctx, sl[0], false)
require.NoError(t, err)
if ss.State == api.SectorState(sealing.Proving) {
time.Sleep(50 * time.Millisecond)
continue
}

require.Equal(t, api.SectorState(sealing.Available), ss.State)
break
}

require.NoError(t, miner.SectorAbortUpgrade(ctx, sl[0]))

for i := 0; i < 100; i++ {
ss, err = miner.SectorsStatus(ctx, sl[0], false)
require.NoError(t, err)
if ss.State == api.SectorState(sealing.Available) {
time.Sleep(50 * time.Millisecond)
continue
}

require.Equal(t, api.SectorState(sealing.Proving), ss.State)
break
}
}

0 comments on commit f508d1e

Please sign in to comment.