OSDN Git Service

modify params (#269)
authoroysheng <33340252+oysheng@users.noreply.github.com>
Fri, 12 Jul 2019 07:40:47 +0000 (15:40 +0800)
committerPaladz <yzhu101@uottawa.ca>
Fri, 12 Jul 2019 07:40:47 +0000 (15:40 +0800)
* modify params

* optimise

cmd/vapord/commands/init.go
config/genesis.go
docker/vapord/config.toml

index 4003047..115c54f 100644 (file)
@@ -32,7 +32,9 @@ func initFiles(cmd *cobra.Command, args []string) {
        }
 
        switch config.ChainID {
-       case "vapor":
+       case "mainnet":
+               cfg.EnsureRoot(config.RootDir, config.ChainID)
+       case "testnet":
                cfg.EnsureRoot(config.RootDir, config.ChainID)
        default:
                cfg.EnsureRoot(config.RootDir, "solonet")
index 00c186d..aabb430 100644 (file)
@@ -150,9 +150,8 @@ func soloNetGenesisBlock() *types.Block {
 // GenesisBlock will return genesis block
 func GenesisBlock() *types.Block {
        return map[string]func() *types.Block{
-               "main":  mainNetGenesisBlock,
-               "test":  testNetGenesisBlock,
-               "solo":  soloNetGenesisBlock,
-               "vapor": soloNetGenesisBlock,
+               "main": mainNetGenesisBlock,
+               "test": testNetGenesisBlock,
+               "solo": soloNetGenesisBlock,
        }[consensus.ActiveNetParams.Name]()
 }
index 0b8a353..8aae609 100644 (file)
@@ -4,7 +4,7 @@ fast_sync = true
 db_backend = "leveldb"
 api_addr = "0.0.0.0:9889"
 moniker = ""
-chain_id = "vapor"
+chain_id = "mainnet"
 [p2p]
 laddr = "tcp://0.0.0.0:56659"
 seeds = "52.83.133.152:56659"