diff options
author | Péter Szilágyi <peterke@gmail.com> | 2016-09-06 00:07:57 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2016-11-14 23:56:58 +0800 |
commit | 178da7c6a94718389e7192d87df5ee42e7223bc3 (patch) | |
tree | 010f49656b5d1656cf24a4ff9bac35788dd9959f /cmd/utils | |
parent | d89ea3e6f90c32a97bad58b82a15af0d81f4250e (diff) | |
download | dexon-178da7c6a94718389e7192d87df5ee42e7223bc3.tar.gz dexon-178da7c6a94718389e7192d87df5ee42e7223bc3.tar.zst dexon-178da7c6a94718389e7192d87df5ee42e7223bc3.zip |
mobile: initial wrappers for mobile support
Diffstat (limited to 'cmd/utils')
-rw-r--r-- | cmd/utils/bootnodes.go | 30 | ||||
-rw-r--r-- | cmd/utils/flags.go | 4 |
2 files changed, 26 insertions, 8 deletions
diff --git a/cmd/utils/bootnodes.go b/cmd/utils/bootnodes.go index fbbaa1f22..23ac6c2fa 100644 --- a/cmd/utils/bootnodes.go +++ b/cmd/utils/bootnodes.go @@ -16,11 +16,15 @@ package utils -import "github.com/ethereum/go-ethereum/p2p/discover" +import ( + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/p2p/discover" + "github.com/ethereum/go-ethereum/params" +) -// FrontierBootNodes are the enode URLs of the P2P bootstrap nodes running on -// the Frontier network. -var FrontierBootNodes = []*discover.Node{ +// MainnetBootnodes are the enode URLs of the P2P bootstrap nodes running on +// the main Ethereum network. +var MainnetBootnodes = []*discover.Node{ // ETH/DEV Go Bootnodes discover.MustParseNode("enode://a979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c@52.16.188.185:30303"), // IE discover.MustParseNode("enode://de471bccee3d042261d52e9bff31458daecc406142b401d4cd848f677479f73104b9fdeb090af9583d3391b7f10cb2ba9e26865dd5fca4fcdc0fb1e3b723c786@54.94.239.50:30303"), // BR @@ -30,12 +34,26 @@ var FrontierBootNodes = []*discover.Node{ discover.MustParseNode("enode://979b7fa28feeb35a4741660a16076f1943202cb72b6af70d327f053e248bab9ba81760f39d0701ef1d8f89cc1fbd2cacba0710a12cd5314d5e0c9021aa3637f9@5.1.83.226:30303"), } -// TestNetBootNodes are the enode URLs of the P2P bootstrap nodes running on the +// TestnetBootnodes are the enode URLs of the P2P bootstrap nodes running on the // Morden test network. -var TestNetBootNodes = []*discover.Node{ +var TestnetBootnodes = []*discover.Node{ // ETH/DEV Go Bootnodes discover.MustParseNode("enode://e4533109cc9bd7604e4ff6c095f7a1d807e15b38e9bfeb05d3b7c423ba86af0a9e89abbf40bd9dde4250fef114cd09270fa4e224cbeef8b7bf05a51e8260d6b8@94.242.229.4:40404"), discover.MustParseNode("enode://8c336ee6f03e99613ad21274f269479bf4413fb294d697ef15ab897598afb931f56beb8e97af530aee20ce2bcba5776f4a312bc168545de4d43736992c814592@94.242.229.203:30303"), // ETH/DEV Cpp Bootnodes } + +// MainnetChainConfig is the chain parameters to run a node on the main network. +var MainnetChainConfig = &core.ChainConfig{ + HomesteadBlock: params.MainNetHomesteadBlock, + DAOForkBlock: params.MainNetDAOForkBlock, + DAOForkSupport: true, +} + +// TestnetChainConfig is the chain parameters to run a node on the test network. +var TestnetChainConfig = &core.ChainConfig{ + HomesteadBlock: params.TestNetHomesteadBlock, + DAOForkBlock: params.TestNetDAOForkBlock, + DAOForkSupport: false, +} diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 2d6bb4f5b..a0b305d4a 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -487,9 +487,9 @@ func MakeBootstrapNodes(ctx *cli.Context) []*discover.Node { // Return pre-configured nodes if none were manually requested if !ctx.GlobalIsSet(BootnodesFlag.Name) { if ctx.GlobalBool(TestNetFlag.Name) { - return TestNetBootNodes + return TestnetBootnodes } - return FrontierBootNodes + return MainnetBootnodes } // Otherwise parse and use the CLI bootstrap nodes bootnodes := []*discover.Node{} |