aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-02-07 07:38:36 +0800
committerFelix Lange <fjl@twurst.com>2015-02-07 07:52:49 +0800
commit028775a0863946c1e9ad51fe7b22faa5c59b2605 (patch)
treebc3962f1ad12e421cd8f67291af7a571d364b1c4 /cmd
parent2cf4fed11b01bb99e08b838f7df2b9396f42f758 (diff)
downloadgo-tangerine-028775a0863946c1e9ad51fe7b22faa5c59b2605.tar
go-tangerine-028775a0863946c1e9ad51fe7b22faa5c59b2605.tar.gz
go-tangerine-028775a0863946c1e9ad51fe7b22faa5c59b2605.tar.bz2
go-tangerine-028775a0863946c1e9ad51fe7b22faa5c59b2605.tar.lz
go-tangerine-028775a0863946c1e9ad51fe7b22faa5c59b2605.tar.xz
go-tangerine-028775a0863946c1e9ad51fe7b22faa5c59b2605.tar.zst
go-tangerine-028775a0863946c1e9ad51fe7b22faa5c59b2605.zip
cmd/ethereum, cmd/mist: add flag for discovery bootstrap nodes
Diffstat (limited to 'cmd')
-rw-r--r--cmd/ethereum/flags.go4
-rw-r--r--cmd/ethereum/main.go3
-rw-r--r--cmd/mist/flags.go4
-rw-r--r--cmd/mist/main.go5
-rw-r--r--cmd/mist/ui_lib.go2
-rw-r--r--cmd/utils/cmd.go4
6 files changed, 12 insertions, 10 deletions
diff --git a/cmd/ethereum/flags.go b/cmd/ethereum/flags.go
index af57c6a67..87fdd2838 100644
--- a/cmd/ethereum/flags.go
+++ b/cmd/ethereum/flags.go
@@ -49,7 +49,7 @@ var (
AddPeer string
MaxPeer int
GenAddr bool
- SeedNode string
+ BootNodes string
SecretFile string
ExportDir string
NonInteractive bool
@@ -101,7 +101,7 @@ func Init() {
flag.BoolVar(&StartRpc, "rpc", false, "start rpc server")
flag.BoolVar(&StartWebSockets, "ws", false, "start websocket server")
flag.BoolVar(&NonInteractive, "y", false, "non-interactive mode (say yes to confirmations)")
- flag.StringVar(&SeedNode, "seednode", "poc-8.ethdev.com:30303", "ip:port of seed node to connect to. Set to blank for skip")
+ flag.StringVar(&BootNodes, "bootnodes", "", "space-separated node URLs for discovery bootstrap")
flag.BoolVar(&SHH, "shh", true, "whisper protocol (on)")
flag.BoolVar(&Dial, "dial", true, "dial out connections (on)")
flag.BoolVar(&GenAddr, "genaddr", false, "create a new priv/pub key")
diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go
index faac0bc5d..14e67fe4a 100644
--- a/cmd/ethereum/main.go
+++ b/cmd/ethereum/main.go
@@ -74,6 +74,7 @@ func main() {
KeyRing: KeyRing,
Shh: SHH,
Dial: Dial,
+ BootNodes: BootNodes,
})
if err != nil {
@@ -133,7 +134,7 @@ func main() {
utils.StartWebSockets(ethereum, WsPort)
}
- utils.StartEthereum(ethereum, SeedNode)
+ utils.StartEthereum(ethereum)
if StartJsConsole {
InitJsConsole(ethereum)
diff --git a/cmd/mist/flags.go b/cmd/mist/flags.go
index f042b39b0..3a7d2ac54 100644
--- a/cmd/mist/flags.go
+++ b/cmd/mist/flags.go
@@ -51,7 +51,7 @@ var (
AddPeer string
MaxPeer int
GenAddr bool
- SeedNode string
+ BootNodes string
SecretFile string
ExportDir string
NonInteractive bool
@@ -116,7 +116,7 @@ func Init() {
flag.BoolVar(&StartRpc, "rpc", true, "start rpc server")
flag.BoolVar(&StartWebSockets, "ws", false, "start websocket server")
flag.BoolVar(&NonInteractive, "y", false, "non-interactive mode (say yes to confirmations)")
- flag.StringVar(&SeedNode, "seednode", "poc-8.ethdev.com:30303", "ip:port of seed node to connect to. Set to blank for skip")
+ flag.StringVar(&BootNodes, "bootnodes", "", "space-separated node URLs for discovery bootstrap")
flag.BoolVar(&GenAddr, "genaddr", false, "create a new priv/pub key")
flag.StringVar(&NatType, "nat", "", "NAT support (UPNP|PMP) (none)")
flag.StringVar(&SecretFile, "import", "", "imports the file given (hex or mnemonic formats)")
diff --git a/cmd/mist/main.go b/cmd/mist/main.go
index 17ab9467a..5bae33088 100644
--- a/cmd/mist/main.go
+++ b/cmd/mist/main.go
@@ -59,8 +59,9 @@ func run() error {
LogLevel: LogLevel,
MaxPeers: MaxPeer,
Port: OutboundPort,
- NATType: PMPGateway,
+ NATType: NatType,
PMPGateway: PMPGateway,
+ BootNodes: BootNodes,
KeyRing: KeyRing,
Dial: true,
})
@@ -82,7 +83,7 @@ func run() error {
utils.RegisterInterrupt(func(os.Signal) {
gui.Stop()
})
- go utils.StartEthereum(ethereum, SeedNode)
+ go utils.StartEthereum(ethereum)
fmt.Println("ETH stack took", time.Since(tstart))
diff --git a/cmd/mist/ui_lib.go b/cmd/mist/ui_lib.go
index dbebd8a6f..ba3ac3b61 100644
--- a/cmd/mist/ui_lib.go
+++ b/cmd/mist/ui_lib.go
@@ -136,7 +136,7 @@ func (ui *UiLib) Muted(content string) {
func (ui *UiLib) Connect(button qml.Object) {
if !ui.connected {
- ui.eth.Start(SeedNode)
+ ui.eth.Start()
ui.connected = true
button.Set("enabled", false)
}
diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go
index 2f48bced5..ecb847fc3 100644
--- a/cmd/utils/cmd.go
+++ b/cmd/utils/cmd.go
@@ -121,9 +121,9 @@ func exit(err error) {
os.Exit(status)
}
-func StartEthereum(ethereum *eth.Ethereum, SeedNode string) {
+func StartEthereum(ethereum *eth.Ethereum) {
clilogger.Infoln("Starting ", ethereum.Name())
- if err := ethereum.Start(SeedNode); err != nil {
+ if err := ethereum.Start(); err != nil {
exit(err)
}
RegisterInterrupt(func(sig os.Signal) {