aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/discover/table.go
diff options
context:
space:
mode:
Diffstat (limited to 'p2p/discover/table.go')
-rw-r--r--p2p/discover/table.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/p2p/discover/table.go b/p2p/discover/table.go
index 3702a2114..fa791c9f3 100644
--- a/p2p/discover/table.go
+++ b/p2p/discover/table.go
@@ -177,8 +177,14 @@ func (tab *Table) refresh() {
result := tab.Lookup(randomID(tab.self.ID, ld))
if len(result) == 0 {
- // bootstrap the table with a self lookup
- all := tab.bondall(tab.nursery)
+ // Pick a batch of previously know seeds to lookup with and discard them (will come back if they are still live)
+ seeds := tab.db.list(10)
+ for _, seed := range seeds {
+ glog.V(logger.Debug).Infoln("Seeding network with:", seed)
+ tab.db.delete(seed.ID)
+ }
+ // Bootstrap the table with a self lookup
+ all := tab.bondall(append(tab.nursery, seeds...))
tab.mutex.Lock()
tab.add(all)
tab.mutex.Unlock()