cmd/ethereum, cmd/mist: add flag for discovery bootstrap nodes

This commit is contained in:
Felix Lange
2015-02-07 00:38:36 +01:00
parent 2cf4fed11b
commit 028775a086
9 changed files with 43 additions and 22 deletions

View File

@ -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()