Skip to content

Commit

Permalink
build: v2.2.0-rc2 (#156)
Browse files Browse the repository at this point in the history
* fix: fix load builtin actors

* build: bump version to v2.2.0-rc2
  • Loading branch information
simlecode authored Jun 25, 2022
1 parent f20fb5b commit 85590cc
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 46 deletions.
34 changes: 2 additions & 32 deletions cmd/load_builtin_actor.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ package cmd

import (
"context"
"fmt"

"github.com/filecoin-project/venus-market/v2/config"
v1 "github.com/filecoin-project/venus/venus-shared/api/chain/v1"
builtinactors "github.com/filecoin-project/venus/venus-shared/builtin-actors"
"github.com/filecoin-project/venus/venus-shared/types"
"github.com/filecoin-project/venus/venus-shared/utils"
"github.com/ipfs-force-community/venus-common-utils/apiinfo"
)

Expand All @@ -23,33 +21,5 @@ func FetchAndLoadBundles(ctx context.Context, nodeCfg config.Node) error {
}
defer closer()

networkName, err := fullNodeAPI.StateNetworkName(ctx)
if err != nil {
return err
}

nt, err := networkNameToNetworkType(networkName)
if err != nil {
return err
}

return builtinactors.SetNetworkBundle(nt)
}

func networkNameToNetworkType(networkName types.NetworkName) (types.NetworkType, error) {
switch networkName {
case "":
return types.NetworkDefault, fmt.Errorf("network name is empty")
case "mainnet":
return types.NetworkMainnet, nil
case "calibrationnet", "calibnet":
return types.NetworkCalibnet, nil
case "butterflynet", "butterfly":
return types.NetworkButterfly, nil
case "interopnet", "interop":
return types.NetworkInterop, nil
default:
// include 2k force
return types.Network2k, nil
}
return utils.LoadBuiltinActors(ctx, fullNodeAPI)
}
4 changes: 0 additions & 4 deletions paychmgr/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"github.com/filecoin-project/venus-market/v2/api/clients"
"github.com/filecoin-project/venus-market/v2/models/repo"
v1api "github.com/filecoin-project/venus/venus-shared/api/chain/v1"
builtinactors "github.com/filecoin-project/venus/venus-shared/builtin-actors"
types2 "github.com/filecoin-project/venus/venus-shared/types"
types "github.com/filecoin-project/venus/venus-shared/types/market"
"github.com/ipfs-force-community/venus-common-utils/metrics"
Expand Down Expand Up @@ -109,9 +108,6 @@ func NewManager(mctx metrics.MetricsCtx, repo repo.Repo, msgClient clients.IMixM

// newManager is used by the tests to supply mocks
func newManager(ctx context.Context, r repo.Repo, pchapi managerAPI) (*Manager, error) {
if err := builtinactors.SetNetworkBundle(types2.NetworkMainnet); err != nil {
return nil, err
}
var shutdown context.CancelFunc
ctx, shutdown = context.WithCancel(ctx)
pm := &Manager{
Expand Down
7 changes: 0 additions & 7 deletions storageprovider/storageprovider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,6 @@ func (m mockAddrMgr) GetAccount(ctx context.Context, addr address.Address) (stri
panic("implement me")
}

func (m mockAddrMgr) AddAddress(ctx context.Context, user marketypes.User) error {
//TODO implement me
panic("implement me")
}

var _ StorageProviderNode = (*mockProviderNode)(nil)

type mockProviderNode struct {
mock.MockFullNode
dataLk sync.Mutex
Expand Down
2 changes: 0 additions & 2 deletions types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,3 @@ var Clock = clock.NewSystemClock()
// ShutdownChan is a channel to which you send a value if you intend to shut
// down the daemon (or miner), including the node and RPC server.
type ShutdownChan chan struct{}

type BuiltinActorsLoaded struct{}
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package version
var (
CurrentCommit string

Version = "v2.2.0-rc1"
Version = "v2.2.0-rc2"
)

func UserVersion() string {
Expand Down

0 comments on commit 85590cc

Please sign in to comment.