aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/discover/table.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-04-23 20:51:41 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-04-24 16:23:20 +0800
commit936c8e19ff3db376fdd1ed53772c51c817a72112 (patch)
tree656f8d983b6a0e20026542d60377f1a7169c5ce2 /p2p/discover/table.go
parentb6ec1c720fc65d8bac36bd2e28bf1df1de1ffe5b (diff)
downloadgo-tangerine-936c8e19ff3db376fdd1ed53772c51c817a72112.tar
go-tangerine-936c8e19ff3db376fdd1ed53772c51c817a72112.tar.gz
go-tangerine-936c8e19ff3db376fdd1ed53772c51c817a72112.tar.bz2
go-tangerine-936c8e19ff3db376fdd1ed53772c51c817a72112.tar.lz
go-tangerine-936c8e19ff3db376fdd1ed53772c51c817a72112.tar.xz
go-tangerine-936c8e19ff3db376fdd1ed53772c51c817a72112.tar.zst
go-tangerine-936c8e19ff3db376fdd1ed53772c51c817a72112.zip
p2p/discover: store nodes in leveldb
Diffstat (limited to 'p2p/discover/table.go')
-rw-r--r--p2p/discover/table.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/p2p/discover/table.go b/p2p/discover/table.go
index e2e846456..ba2f9b8ec 100644
--- a/p2p/discover/table.go
+++ b/p2p/discover/table.go
@@ -59,9 +59,10 @@ type bucket struct {
}
func newTable(t transport, ourID NodeID, ourAddr *net.UDPAddr) *Table {
+ db, _ := newNodeDB("", Version)
tab := &Table{
net: t,
- db: new(nodeDB),
+ db: db,
self: newNode(ourID, ourAddr),
bonding: make(map[NodeID]*bondproc),
bondslots: make(chan struct{}, maxBondingPingPongs),