Add -network_type=pangaea

pull/1300/head
Eugene Kim 5 years ago
parent 02c68947ef
commit 3b8fc36d0d
  1. 4
      cmd/harmony/main.go
  2. 1
      internal/configs/node/config.go

@ -236,7 +236,7 @@ func createGlobalConfig() *nodeconfig.ConfigType {
// Set network type // Set network type
netType := nodeconfig.NetworkType(*networkType) netType := nodeconfig.NetworkType(*networkType)
switch netType { switch netType {
case nodeconfig.Mainnet, nodeconfig.Testnet, nodeconfig.Localnet, nodeconfig.Devnet: case nodeconfig.Mainnet, nodeconfig.Testnet, nodeconfig.Pangaea, nodeconfig.Localnet, nodeconfig.Devnet:
nodeConfig.SetNetworkType(netType) nodeConfig.SetNetworkType(netType)
default: default:
panic(fmt.Sprintf("invalid network type: %s", *networkType)) panic(fmt.Sprintf("invalid network type: %s", *networkType))
@ -373,6 +373,8 @@ func main() {
core.ShardingSchedule = shardingconfig.MainnetSchedule core.ShardingSchedule = shardingconfig.MainnetSchedule
case nodeconfig.Testnet: case nodeconfig.Testnet:
core.ShardingSchedule = shardingconfig.TestnetSchedule core.ShardingSchedule = shardingconfig.TestnetSchedule
case nodeconfig.Pangaea:
core.ShardingSchedule = shardingconfig.PangaeaSchedule
case nodeconfig.Localnet: case nodeconfig.Localnet:
core.ShardingSchedule = shardingconfig.LocalnetSchedule core.ShardingSchedule = shardingconfig.LocalnetSchedule
case nodeconfig.Devnet: case nodeconfig.Devnet:

@ -50,6 +50,7 @@ type NetworkType string
const ( const (
Mainnet = "mainnet" Mainnet = "mainnet"
Testnet = "testnet" Testnet = "testnet"
Pangaea = "pangaea"
Devnet = "devnet" Devnet = "devnet"
Localnet = "localnet" Localnet = "localnet"
) )

Loading…
Cancel
Save