p2p/discover: store nodes in leveldb

This commit is contained in:
Felix Lange
2015-04-23 14:51:41 +02:00
committed by Péter Szilágyi
parent b6ec1c720f
commit 936c8e19ff
2 changed files with 73 additions and 13 deletions

View File

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