More fixes

This commit is contained in:
zenground0 2022-04-08 07:44:46 -06:00 committed by vyzo
parent 7163fe61a0
commit 60d09579be
5 changed files with 12 additions and 13 deletions

View File

@ -130,7 +130,7 @@ func TestForkHeightTriggers(t *testing.T) {
Network: network.Version1, Network: network.Version1,
Height: testForkHeight, Height: testForkHeight,
Migration: func(ctx context.Context, sm *StateManager, cache MigrationCache, cb ExecMonitor, 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()) cst := ipldcbor.NewCborStore(sm.ChainStore().StateBlockstore())
st, err := sm.StateTree(root) st, err := sm.StateTree(root)
@ -276,7 +276,7 @@ func testForkRefuseCall(t *testing.T, nullsBefore, nullsAfter int) {
Expensive: true, Expensive: true,
Height: testForkHeight, Height: testForkHeight,
Migration: func(ctx context.Context, sm *StateManager, cache MigrationCache, cb ExecMonitor, 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++ migrationCount++
return root, nil return root, nil
}}}, cg.BeaconSchedule()) }}}, cg.BeaconSchedule())
@ -412,7 +412,7 @@ func TestForkPreMigration(t *testing.T) {
Network: network.Version1, Network: network.Version1,
Height: testForkHeight, Height: testForkHeight,
Migration: func(ctx context.Context, sm *StateManager, cache MigrationCache, cb ExecMonitor, 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. // Make sure the test that should be canceled, is canceled.
select { select {

View File

@ -4,8 +4,6 @@ import (
"bytes" "bytes"
"testing" "testing"
market7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/market"
"github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"gotest.tools/assert" "gotest.tools/assert"
@ -14,6 +12,7 @@ import (
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
api "github.com/filecoin-project/lotus/api" api "github.com/filecoin-project/lotus/api"
tutils "github.com/filecoin-project/specs-actors/v2/support/testing" 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) { func TestSectorInfoSerialization(t *testing.T) {
@ -30,7 +29,7 @@ func TestSectorInfoSerialization(t *testing.T) {
StartEpoch: 0, StartEpoch: 0,
EndEpoch: 100, EndEpoch: 100,
}, },
DealProposal: &market7.DealProposal{ DealProposal: &market8.DealProposal{
PieceCID: dummyCid, PieceCID: dummyCid,
PieceSize: 5, PieceSize: 5,
Client: tutils.NewActorAddr(t, "client"), Client: tutils.NewActorAddr(t, "client"),

View File

@ -21,7 +21,7 @@ import (
"github.com/filecoin-project/lotus/node/config" "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) { func TestShardRegistration(t *testing.T) {

View File

@ -10,7 +10,7 @@ import (
"testing" "testing"
"time" "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" sealing "github.com/filecoin-project/lotus/extern/storage-sealing"
@ -33,7 +33,7 @@ import (
) )
func TestOnDealSectorPreCommitted(t *testing.T) { func TestOnDealSectorPreCommitted(t *testing.T) {
label, err := market7.NewDealLabelFromString("success") label, err := market8.NewLabelFromString("success")
require.NoError(t, err) require.NoError(t, err)
provider := address.TestAddress provider := address.TestAddress
@ -257,7 +257,7 @@ func TestOnDealSectorPreCommitted(t *testing.T) {
} }
func TestOnDealSectorCommitted(t *testing.T) { func TestOnDealSectorCommitted(t *testing.T) {
label, err := market7.NewDealLabelFromString("success") label, err := market8.NewLabelFromString("success")
require.NoError(t, err) require.NoError(t, err)
provider := address.TestAddress provider := address.TestAddress

View File

@ -9,7 +9,7 @@ import (
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/lotus/extern/sector-storage/mock" "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" "golang.org/x/xerrors"
"github.com/filecoin-project/lotus/chain/types" "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 { for i := range genm.Sectors {
label, err := market7.NewDealLabelFromString(fmt.Sprintf("%d", i)) label, err := market8.NewLabelFromString(fmt.Sprintf("%d", i))
if err != nil { if err != nil {
return nil, nil, xerrors.Errorf("failed to create label: %w", err) 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) r := mock.CommDR(d)
preseal.CommR, _ = commcid.ReplicaCommitmentV1ToCID(r[:]) preseal.CommR, _ = commcid.ReplicaCommitmentV1ToCID(r[:])
preseal.SectorID = abi.SectorNumber(i + 1) preseal.SectorID = abi.SectorNumber(i + 1)
preseal.Deal = market7.DealProposal{ preseal.Deal = market8.DealProposal{
PieceCID: preseal.CommD, PieceCID: preseal.CommD,
PieceSize: abi.PaddedPieceSize(ssize), PieceSize: abi.PaddedPieceSize(ssize),
Client: k.Address, Client: k.Address,