From 028775a0863946c1e9ad51fe7b22faa5c59b2605 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Sat, 7 Feb 2015 00:38:36 +0100 Subject: cmd/ethereum, cmd/mist: add flag for discovery bootstrap nodes --- p2p/discover/table.go | 4 ++-- p2p/server.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'p2p') 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 -- cgit v1.2.3