Skip to content

Commit

Permalink
Merge pull request #6245 from filecoin-project/chore/remove-unused-ne…
Browse files Browse the repository at this point in the history
…twork-params

chore: remove hyperspace and wallaby
  • Loading branch information
LinZexiao authored Dec 7, 2023
2 parents d85a8d7 + 91fed59 commit c4c6137
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 183 deletions.
4 changes: 0 additions & 4 deletions fixtures/assets/asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@ func GetGenesis(networkType types.NetworkType) ([]byte, error) {
fileName = "interopnet.car"
case types.NetworkButterfly:
fileName = "butterflynet.car"
case types.NetworkHyperspace:
fileName = "hyperspacenet.car"
case types.NetworkCalibnet:
fileName = "calibnet.car"
case types.NetworkWallaby:
fileName = "wallabynet.car"
default:
fileName = "mainnet.car"
}
Expand Down
Binary file removed fixtures/assets/genesis-car/hyperspacenet.car
Binary file not shown.
Binary file removed fixtures/assets/genesis-car/wallabynet.car
Binary file not shown.
73 changes: 0 additions & 73 deletions fixtures/networks/hyperspace.go

This file was deleted.

4 changes: 0 additions & 4 deletions fixtures/networks/network_parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ func GetNetworkConfigFromType(networkType types.NetworkType) (*NetworkConf, erro
return InteropNet(), nil
case types.NetworkButterfly:
return ButterflySnapNet(), nil
case types.NetworkWallaby:
return WallabyNet(), nil
case types.NetworkHyperspace:
return HyperspaceNet(), nil
}

return nil, fmt.Errorf("unknown network type %d", networkType)
Expand Down
5 changes: 0 additions & 5 deletions fixtures/networks/network_parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ func TestGetNetworkFromName(t *testing.T) {
network: types.NetworkButterfly,
err: nil,
},
// {
// name: "hyperspacenet",
// network: types.NetworkHyperspace,
// err: nil,
// },
{
name: "unknown",
network: 0,
Expand Down
73 changes: 0 additions & 73 deletions fixtures/networks/wallaby.go

This file was deleted.

4 changes: 2 additions & 2 deletions pkg/fork/fork.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ func init() {
if mwcs := os.Getenv(EnvMigrationMaxWorkerCount); mwcs != "" {
mwc, err := strconv.ParseInt(mwcs, 10, 32)
if err != nil {
log.Warnf("invalid value for %s (%s) defaulting to %d: %s", EnvMigrationMaxWorkerCount, mwcs, MigrationMaxWorkerCount, err)
fmt.Printf("invalid value for %s (%s) defaulting to %d: %s\n", EnvMigrationMaxWorkerCount, mwcs, MigrationMaxWorkerCount, err)
return
}
// use value from environment
log.Infof("migration worker cound set from %s (%d)", EnvMigrationMaxWorkerCount, mwc)
fmt.Printf("migration worker count set from %s (%d)\n", EnvMigrationMaxWorkerCount, mwc)
MigrationMaxWorkerCount = int(mwc)
return
}
Expand Down
8 changes: 0 additions & 8 deletions venus-shared/actors/builtin_actors.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ func init() {
// NetworkInterop NetworkType = 0x6
// NetworkForce NetworkType = 0x7
// NetworkButterfly NetworkType = 0x8
// NetworkWallaby NetworkType = 0x9
// NetworkHyperspace NetworkType = 0x10
// Avoid import cycle, we use concrete values
func SetNetworkBundle(networkType int) error {
networkBundle := ""
Expand All @@ -74,12 +72,6 @@ func SetNetworkBundle(networkType int) error {
// case types.NetworkButterfly:
case 0x8:
networkBundle = "butterflynet"
// case types.NetworkWallaby:
case 0x9:
networkBundle = "wallaby"
// case types.NetworkHyperspace:
case 0x10:
networkBundle = "hyperspace"
default:
networkBundle = "mainnet"
}
Expand Down
22 changes: 9 additions & 13 deletions venus-shared/types/api_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,24 +78,20 @@ const (
NetworkNameInterop NetworkName = "interopnet"
NetworkNameIntegration NetworkName = "integrationnet"
NetworkNameForce NetworkName = "forcenet"
NetworkNameWallaby NetworkName = "wallabynet"
NetworkNameHyperspace NetworkName = "hyperspacenet"
)

type NetworkType int

const (
NetworkDefault NetworkType = 0
NetworkMainnet NetworkType = 0x1
Network2k NetworkType = 0x2
NetworkDebug NetworkType = 0x3
NetworkCalibnet NetworkType = 0x4
NetworkNerpa NetworkType = 0x5
NetworkInterop NetworkType = 0x6
NetworkForce NetworkType = 0x7
NetworkButterfly NetworkType = 0x8
NetworkWallaby NetworkType = 0x9
NetworkHyperspace NetworkType = 0x10
NetworkDefault NetworkType = 0
NetworkMainnet NetworkType = 0x1
Network2k NetworkType = 0x2
NetworkDebug NetworkType = 0x3
NetworkCalibnet NetworkType = 0x4
NetworkNerpa NetworkType = 0x5
NetworkInterop NetworkType = 0x6
NetworkForce NetworkType = 0x7
NetworkButterfly NetworkType = 0x8

Integrationnet NetworkType = 0x30
)
Expand Down
2 changes: 1 addition & 1 deletion venus-shared/utils/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/stretchr/testify/assert"
)

func TestNetworkNamtToNetworkType(t *testing.T) {
func TestNetworkNameToNetworkType(t *testing.T) {
tf.UnitTest(t)
assert.Len(t, NetworkTypeWithNetworkName, 6)
assert.Len(t, NetworkNameWithNetworkType, 6)
Expand Down

0 comments on commit c4c6137

Please sign in to comment.