Fix tests after specs update
This commit is contained in:
parent
84b6734063
commit
8756df2447
@ -6,6 +6,8 @@ import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
|
||||
builtin6 "github.com/filecoin-project/specs-actors/v6/actors/builtin"
|
||||
|
||||
"github.com/ipfs/go-cid"
|
||||
cbor "github.com/ipfs/go-ipld-cbor"
|
||||
cbg "github.com/whyrusleeping/cbor-gen"
|
||||
@ -399,11 +401,24 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal
|
||||
}
|
||||
|
||||
// Commit one-by-one, otherwise pledge math tends to explode
|
||||
var paramBytes []byte
|
||||
|
||||
if av >= actors.Version6 {
|
||||
// TODO: fixup
|
||||
confirmParams := &builtin6.ConfirmSectorProofsParams{
|
||||
Sectors: []abi.SectorNumber{preseal.SectorID},
|
||||
}
|
||||
|
||||
paramBytes = mustEnc(confirmParams)
|
||||
} else {
|
||||
confirmParams := &builtin0.ConfirmSectorProofsParams{
|
||||
Sectors: []abi.SectorNumber{preseal.SectorID},
|
||||
}
|
||||
|
||||
_, err = doExecValue(ctx, vm, minerInfos[i].maddr, power.Address, big.Zero(), miner.Methods.ConfirmSectorProofsValid, mustEnc(confirmParams))
|
||||
paramBytes = mustEnc(confirmParams)
|
||||
}
|
||||
|
||||
_, err = doExecValue(ctx, vm, minerInfos[i].maddr, power.Address, big.Zero(), miner.Methods.ConfirmSectorProofsValid, paramBytes)
|
||||
if err != nil {
|
||||
return cid.Undef, xerrors.Errorf("failed to confirm presealed sectors: %w", err)
|
||||
}
|
||||
|
3
extern/storage-sealing/states_failed_test.go
vendored
3
extern/storage-sealing/states_failed_test.go
vendored
@ -5,6 +5,8 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/filecoin-project/go-state-types/network"
|
||||
|
||||
market0 "github.com/filecoin-project/specs-actors/actors/builtin/market"
|
||||
|
||||
"github.com/golang/mock/gomock"
|
||||
@ -59,6 +61,7 @@ func TestStateRecoverDealIDs(t *testing.T) {
|
||||
}),
|
||||
},
|
||||
}, nil)
|
||||
api.EXPECT().StateNetworkVersion(ctx, nil).Return(network.Version0, nil)
|
||||
api.EXPECT().StateMarketStorageDeal(ctx, dealId, nil).Return(&api2.MarketDeal{
|
||||
Proposal: dealProposal,
|
||||
}, nil)
|
||||
|
Loading…
Reference in New Issue
Block a user