aboutsummaryrefslogtreecommitdiffstats
path: root/eth/backend.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-02-03 03:04:00 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-02-03 03:04:00 +0800
commit1f4ed49b4c3400c8f567a29c70d4fb26df97f305 (patch)
treef16968a25055aeaee6c4a3abed731f40415f3884 /eth/backend.go
parent57c6caf146a815f29b0698b8f67c827a254d7836 (diff)
downloadgo-tangerine-1f4ed49b4c3400c8f567a29c70d4fb26df97f305.tar.gz
go-tangerine-1f4ed49b4c3400c8f567a29c70d4fb26df97f305.tar.zst
go-tangerine-1f4ed49b4c3400c8f567a29c70d4fb26df97f305.zip
Move hardcoded seed node address to app flag
Replaces functionality `-seed=true` with `-seed="ip:port"`
Diffstat (limited to 'eth/backend.go')
-rw-r--r--eth/backend.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/eth/backend.go b/eth/backend.go
index b7b5c5f85..cb00069d3 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -17,10 +17,6 @@ import (
"github.com/ethereum/go-ethereum/whisper"
)
-const (
- seedNodeAddress = "poc-8.ethdev.com:30303"
-)
-
type Config struct {
Name string
Version string
@@ -224,7 +220,7 @@ func (s *Ethereum) Coinbase() []byte {
}
// Start the ethereum
-func (s *Ethereum) Start(seed bool) error {
+func (s *Ethereum) Start(seedNode string) error {
err := s.net.Start()
if err != nil {
return err
@@ -247,9 +243,9 @@ func (s *Ethereum) Start(seed bool) error {
go s.blockBroadcastLoop()
// TODO: read peers here
- if seed {
- logger.Infof("Connect to seed node %v", seedNodeAddress)
- if err := s.SuggestPeer(seedNodeAddress); err != nil {
+ if len(seedNode) > 0 {
+ logger.Infof("Connect to seed node %v", seedNode)
+ if err := s.SuggestPeer(seedNode); err != nil {
logger.Infoln(err)
}
}