aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-04-25 19:31:15 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-04-25 19:53:50 +0800
commite61035c5a3630e4f6fd0fb3e5346a4eed8cedc80 (patch)
tree9dd32e8fb794b4950313ae2b2cd5499bb60dc4cd /cmd
parentba3bcd16a6d99bc0e58516556df8e96b730c2d60 (diff)
downloadgo-tangerine-e61035c5a3630e4f6fd0fb3e5346a4eed8cedc80.tar
go-tangerine-e61035c5a3630e4f6fd0fb3e5346a4eed8cedc80.tar.gz
go-tangerine-e61035c5a3630e4f6fd0fb3e5346a4eed8cedc80.tar.bz2
go-tangerine-e61035c5a3630e4f6fd0fb3e5346a4eed8cedc80.tar.lz
go-tangerine-e61035c5a3630e4f6fd0fb3e5346a4eed8cedc80.tar.xz
go-tangerine-e61035c5a3630e4f6fd0fb3e5346a4eed8cedc80.tar.zst
go-tangerine-e61035c5a3630e4f6fd0fb3e5346a4eed8cedc80.zip
cmd, eth, les, mobile: make networkid uint64 everywhere
Diffstat (limited to 'cmd')
-rw-r--r--cmd/faucet/faucet.go4
-rw-r--r--cmd/puppeth/wizard_genesis.go2
-rw-r--r--cmd/utils/flags.go4
3 files changed, 5 insertions, 5 deletions
diff --git a/cmd/faucet/faucet.go b/cmd/faucet/faucet.go
index f87cfdb72..1c5c43edc 100644
--- a/cmd/faucet/faucet.go
+++ b/cmd/faucet/faucet.go
@@ -61,7 +61,7 @@ var (
apiPortFlag = flag.Int("apiport", 8080, "Listener port for the HTTP API connection")
ethPortFlag = flag.Int("ethport", 30303, "Listener port for the devp2p connection")
bootFlag = flag.String("bootnodes", "", "Comma separated bootnode enode URLs to seed with")
- netFlag = flag.Int("network", 0, "Network ID to use for the Ethereum protocol")
+ netFlag = flag.Uint64("network", 0, "Network ID to use for the Ethereum protocol")
statsFlag = flag.String("ethstats", "", "Ethstats network monitoring auth string")
netnameFlag = flag.String("faucet.name", "", "Network name to assign to the faucet")
@@ -179,7 +179,7 @@ type faucet struct {
lock sync.RWMutex // Lock protecting the faucet's internals
}
-func newFaucet(genesis *core.Genesis, port int, enodes []*discv5.Node, network int, stats string, ks *keystore.KeyStore, index []byte) (*faucet, error) {
+func newFaucet(genesis *core.Genesis, port int, enodes []*discv5.Node, network uint64, stats string, ks *keystore.KeyStore, index []byte) (*faucet, error) {
// Assemble the raw devp2p protocol stack
stack, err := node.New(&node.Config{
Name: "geth",
diff --git a/cmd/puppeth/wizard_genesis.go b/cmd/puppeth/wizard_genesis.go
index a67812e92..705e01031 100644
--- a/cmd/puppeth/wizard_genesis.go
+++ b/cmd/puppeth/wizard_genesis.go
@@ -120,7 +120,7 @@ func (w *wizard) makeGenesis() {
// Query the user for some custom extras
fmt.Println()
fmt.Println("Specify your chain/network ID if you want an explicit one (default = random)")
- genesis.Config.ChainId = big.NewInt(int64(w.readDefaultInt(rand.Intn(65536))))
+ genesis.Config.ChainId = new(big.Int).SetUint64(uint64(w.readDefaultInt(rand.Intn(65536))))
fmt.Println()
fmt.Println("Anything fun to embed into the genesis block? (max 32 bytes)")
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index af9585bd0..afaa7214b 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -148,7 +148,7 @@ var (
Usage: "Number of recent ethash mining DAGs to keep on disk (1+GB each)",
Value: eth.DefaultConfig.EthashDatasetsOnDisk,
}
- NetworkIdFlag = cli.IntFlag{
+ NetworkIdFlag = cli.Uint64Flag{
Name: "networkid",
Usage: "Network identifier (integer, 1=Frontier, 2=Morden (disused), 3=Ropsten)",
Value: eth.DefaultConfig.NetworkId,
@@ -806,7 +806,7 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
cfg.LightPeers = ctx.GlobalInt(LightPeersFlag.Name)
}
if ctx.GlobalIsSet(NetworkIdFlag.Name) {
- cfg.NetworkId = ctx.GlobalInt(NetworkIdFlag.Name)
+ cfg.NetworkId = ctx.GlobalUint64(NetworkIdFlag.Name)
}
// Ethereum needs to know maxPeers to calculate the light server peer ratio.