From 60d09579bed5c435785c7cfb1c659dc3d49e05c9 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Fri, 8 Apr 2022 07:44:46 -0600 Subject: [PATCH] More fixes --- chain/stmgr/forks_test.go | 6 +++--- extern/storage-sealing/types_test.go | 5 ++--- markets/dagstore/wrapper_migration_test.go | 2 +- markets/storageadapter/ondealsectorcommitted_test.go | 6 +++--- storage/mockstorage/preseal.go | 6 +++--- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/chain/stmgr/forks_test.go b/chain/stmgr/forks_test.go index 82ac1a7f9..418834c76 100644 --- a/chain/stmgr/forks_test.go +++ b/chain/stmgr/forks_test.go @@ -130,7 +130,7 @@ func TestForkHeightTriggers(t *testing.T) { Network: network.Version1, Height: testForkHeight, Migration: func(ctx context.Context, sm *StateManager, cache MigrationCache, cb ExecMonitor, - mf cid.Cid, root cid.Cid, height abi.ChainEpoch, ts *types.TipSet) (cid.Cid, error) { + root cid.Cid, _ cid.Cid, height abi.ChainEpoch, ts *types.TipSet) (cid.Cid, error) { cst := ipldcbor.NewCborStore(sm.ChainStore().StateBlockstore()) st, err := sm.StateTree(root) @@ -276,7 +276,7 @@ func testForkRefuseCall(t *testing.T, nullsBefore, nullsAfter int) { Expensive: true, Height: testForkHeight, Migration: func(ctx context.Context, sm *StateManager, cache MigrationCache, cb ExecMonitor, - mf cid.Cid, root cid.Cid, height abi.ChainEpoch, ts *types.TipSet) (cid.Cid, error) { + root cid.Cid, _ cid.Cid, height abi.ChainEpoch, ts *types.TipSet) (cid.Cid, error) { migrationCount++ return root, nil }}}, cg.BeaconSchedule()) @@ -412,7 +412,7 @@ func TestForkPreMigration(t *testing.T) { Network: network.Version1, Height: testForkHeight, Migration: func(ctx context.Context, sm *StateManager, cache MigrationCache, cb ExecMonitor, - mf cid.Cid, root cid.Cid, height abi.ChainEpoch, ts *types.TipSet) (cid.Cid, error) { + root cid.Cid, _ cid.Cid, height abi.ChainEpoch, ts *types.TipSet) (cid.Cid, error) { // Make sure the test that should be canceled, is canceled. select { diff --git a/extern/storage-sealing/types_test.go b/extern/storage-sealing/types_test.go index 180f5dfcc..b16ec0a06 100644 --- a/extern/storage-sealing/types_test.go +++ b/extern/storage-sealing/types_test.go @@ -4,8 +4,6 @@ import ( "bytes" "testing" - market7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/market" - "github.com/ipfs/go-cid" "gotest.tools/assert" @@ -14,6 +12,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" api "github.com/filecoin-project/lotus/api" tutils "github.com/filecoin-project/specs-actors/v2/support/testing" + market8 "github.com/filecoin-project/specs-actors/v8/actors/builtin/market" ) func TestSectorInfoSerialization(t *testing.T) { @@ -30,7 +29,7 @@ func TestSectorInfoSerialization(t *testing.T) { StartEpoch: 0, EndEpoch: 100, }, - DealProposal: &market7.DealProposal{ + DealProposal: &market8.DealProposal{ PieceCID: dummyCid, PieceSize: 5, Client: tutils.NewActorAddr(t, "client"), diff --git a/markets/dagstore/wrapper_migration_test.go b/markets/dagstore/wrapper_migration_test.go index 24e688faf..7e2a3663d 100644 --- a/markets/dagstore/wrapper_migration_test.go +++ b/markets/dagstore/wrapper_migration_test.go @@ -21,7 +21,7 @@ import ( "github.com/filecoin-project/lotus/node/config" - "github.com/filecoin-project/specs-actors/v7/actors/builtin/market" + "github.com/filecoin-project/specs-actors/v8/actors/builtin/market" ) func TestShardRegistration(t *testing.T) { diff --git a/markets/storageadapter/ondealsectorcommitted_test.go b/markets/storageadapter/ondealsectorcommitted_test.go index 9ebe60928..349cf8e1f 100644 --- a/markets/storageadapter/ondealsectorcommitted_test.go +++ b/markets/storageadapter/ondealsectorcommitted_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - market7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/market" + market8 "github.com/filecoin-project/specs-actors/v8/actors/builtin/market" sealing "github.com/filecoin-project/lotus/extern/storage-sealing" @@ -33,7 +33,7 @@ import ( ) func TestOnDealSectorPreCommitted(t *testing.T) { - label, err := market7.NewDealLabelFromString("success") + label, err := market8.NewLabelFromString("success") require.NoError(t, err) provider := address.TestAddress @@ -257,7 +257,7 @@ func TestOnDealSectorPreCommitted(t *testing.T) { } func TestOnDealSectorCommitted(t *testing.T) { - label, err := market7.NewDealLabelFromString("success") + label, err := market8.NewLabelFromString("success") require.NoError(t, err) provider := address.TestAddress diff --git a/storage/mockstorage/preseal.go b/storage/mockstorage/preseal.go index a53e710fb..01fb31ee7 100644 --- a/storage/mockstorage/preseal.go +++ b/storage/mockstorage/preseal.go @@ -9,7 +9,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/lotus/extern/sector-storage/mock" - market7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/market" + market8 "github.com/filecoin-project/specs-actors/v8/actors/builtin/market" "golang.org/x/xerrors" "github.com/filecoin-project/lotus/chain/types" @@ -39,7 +39,7 @@ func PreSeal(spt abi.RegisteredSealProof, maddr address.Address, sectors int) (* } for i := range genm.Sectors { - label, err := market7.NewDealLabelFromString(fmt.Sprintf("%d", i)) + label, err := market8.NewLabelFromString(fmt.Sprintf("%d", i)) if err != nil { return nil, nil, xerrors.Errorf("failed to create label: %w", err) } @@ -52,7 +52,7 @@ func PreSeal(spt abi.RegisteredSealProof, maddr address.Address, sectors int) (* r := mock.CommDR(d) preseal.CommR, _ = commcid.ReplicaCommitmentV1ToCID(r[:]) preseal.SectorID = abi.SectorNumber(i + 1) - preseal.Deal = market7.DealProposal{ + preseal.Deal = market8.DealProposal{ PieceCID: preseal.CommD, PieceSize: abi.PaddedPieceSize(ssize), Client: k.Address,