aboutsummaryrefslogtreecommitdiffstats
path: root/ethereum.go
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2014-07-31 00:03:20 +0800
committerzelig <viktor.tron@gmail.com>2014-07-31 00:03:20 +0800
commit9831619881c5264c2449ce1b906108d892b6e1e1 (patch)
treef8775b1196fe6b31081a553945377f40bdc8d550 /ethereum.go
parent194c58858cd230a9a08b0eb14650720341a5580e (diff)
parent42d47ecfb09ac0b419db5722602d9b02e21f2457 (diff)
downloaddexon-9831619881c5264c2449ce1b906108d892b6e1e1.tar
dexon-9831619881c5264c2449ce1b906108d892b6e1e1.tar.gz
dexon-9831619881c5264c2449ce1b906108d892b6e1e1.tar.bz2
dexon-9831619881c5264c2449ce1b906108d892b6e1e1.tar.lz
dexon-9831619881c5264c2449ce1b906108d892b6e1e1.tar.xz
dexon-9831619881c5264c2449ce1b906108d892b6e1e1.tar.zst
dexon-9831619881c5264c2449ce1b906108d892b6e1e1.zip
merge upstream
Diffstat (limited to 'ethereum.go')
-rw-r--r--ethereum.go40
1 files changed, 15 insertions, 25 deletions
diff --git a/ethereum.go b/ethereum.go
index c48ac00e4..69bb93cff 100644
--- a/ethereum.go
+++ b/ethereum.go
@@ -3,25 +3,27 @@ package eth
import (
"container/list"
"fmt"
- "github.com/ethereum/eth-go/ethchain"
- "github.com/ethereum/eth-go/ethcrypto"
- "github.com/ethereum/eth-go/ethlog"
- "github.com/ethereum/eth-go/ethreact"
- "github.com/ethereum/eth-go/ethrpc"
- "github.com/ethereum/eth-go/ethutil"
- "github.com/ethereum/eth-go/ethwire"
- "io/ioutil"
"math/rand"
"net"
- "net/http"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
+
+ "github.com/ethereum/eth-go/ethchain"
+ "github.com/ethereum/eth-go/ethcrypto"
+ "github.com/ethereum/eth-go/ethlog"
+ "github.com/ethereum/eth-go/ethreact"
+ "github.com/ethereum/eth-go/ethrpc"
+ "github.com/ethereum/eth-go/ethutil"
+ "github.com/ethereum/eth-go/ethwire"
)
-const seedTextFileUri string = "http://www.ethereum.org/servers.poc3.txt"
+const (
+ seedTextFileUri string = "http://www.ethereum.org/servers.poc3.txt"
+ seedNodeAddress = "54.76.56.74:30303"
+)
var ethlogger = ethlog.NewLogger("SERV")
@@ -422,22 +424,10 @@ func (s *Ethereum) Seed() {
}
// Connect to Peer list
s.ProcessPeerList(peers)
- } else {
- // Fallback to servers.poc3.txt
- resp, err := http.Get(seedTextFileUri)
- if err != nil {
- ethlogger.Warnln("Fetching seed failed:", err)
- return
- }
- defer resp.Body.Close()
- body, err := ioutil.ReadAll(resp.Body)
- if err != nil {
- ethlogger.Warnln("Reading seed failed:", err)
- return
- }
-
- s.ConnectToPeer(string(body))
}
+
+ // XXX tmp
+ s.ConnectToPeer(seedNodeAddress)
}
func (s *Ethereum) peerHandler(listener net.Listener) {