From 1f4ed49b4c3400c8f567a29c70d4fb26df97f305 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Mon, 2 Feb 2015 13:04:00 -0600 Subject: Move hardcoded seed node address to app flag Replaces functionality `-seed=true` with `-seed="ip:port"` --- eth/backend.go | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'eth') 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) } } -- cgit v1.2.3