aboutsummaryrefslogtreecommitdiffstats
path: root/p2p
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 /p2p
parent2cf4fed11b01bb99e08b838f7df2b9396f42f758 (diff)
downloadgo-tangerine-028775a0863946c1e9ad51fe7b22faa5c59b2605.tar.gz
go-tangerine-028775a0863946c1e9ad51fe7b22faa5c59b2605.tar.zst
go-tangerine-028775a0863946c1e9ad51fe7b22faa5c59b2605.zip
cmd/ethereum, cmd/mist: add flag for discovery bootstrap nodes
Diffstat (limited to 'p2p')
-rw-r--r--p2p/discover/table.go4
-rw-r--r--p2p/server.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/p2p/discover/table.go b/p2p/discover/table.go
index 6025507eb..1cdd93a78 100644
--- a/p2p/discover/table.go
+++ b/p2p/discover/table.go
@@ -65,12 +65,12 @@ func (tab *Table) Close() {
// to the network if the table is empty. Bootstrap will also attempt to
// fill the table by performing random lookup operations on the
// network.
-func (tab *Table) Bootstrap(nodes []Node) {
+func (tab *Table) Bootstrap(nodes []*Node) {
tab.mutex.Lock()
// TODO: maybe filter nodes with bad fields (nil, etc.) to avoid strange crashes
tab.nursery = make([]*Node, 0, len(nodes))
for _, n := range nodes {
- cpy := n
+ cpy := *n
tab.nursery = append(tab.nursery, &cpy)
}
tab.mutex.Unlock()
diff --git a/p2p/server.go b/p2p/server.go
index bb3101485..3cab61102 100644
--- a/p2p/server.go
+++ b/p2p/server.go
@@ -50,7 +50,7 @@ type Server struct {
// Bootstrap nodes are used to establish connectivity
// with the rest of the network.
- BootstrapNodes []discover.Node
+ BootstrapNodes []*discover.Node
// Protocols should contain the protocols supported
// by the server. Matching protocols are launched for
bc331476deb8a980d0'>- Update to 3.2.1pav2005-01-258-311/+87 * - Update to 3.1.1830pav2004-08-184-17/+15 * SIZEify (maintainer timeout)trevor2004-03-311-0/+1 * Say hello to the new "net-mgmt" category. There are probably morewollman2004-02-231-1/+1 * - Update to 3.1 (1790)pav2004-01-063-12/+17 * - Update to version netams-3.1(1770)krion2003-12-275-56/+60 * Mark as broken on 5.x due to compile problems (possibly related tolinimon2003-12-221-0/+4