aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/discover/table.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-04-27 15:19:16 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-04-27 15:19:16 +0800
commit0201c04b95df3224e5fe1a3a591dba95ab8030dd (patch)
treea81593101d67f6e8ec477a37ef861fe84c1cb1e2 /p2p/discover/table.go
parent8646365b42ddae30e596835b4512792ca11196a5 (diff)
downloaddexon-0201c04b95df3224e5fe1a3a591dba95ab8030dd.tar.gz
dexon-0201c04b95df3224e5fe1a3a591dba95ab8030dd.tar.zst
dexon-0201c04b95df3224e5fe1a3a591dba95ab8030dd.zip
p2p/discovery: fix issues raised in the nodeDb PR
Diffstat (limited to 'p2p/discover/table.go')
-rw-r--r--p2p/discover/table.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/p2p/discover/table.go b/p2p/discover/table.go
index 891bbfd05..e21d9f2f4 100644
--- a/p2p/discover/table.go
+++ b/p2p/discover/table.go
@@ -62,13 +62,12 @@ type bucket struct {
}
func newTable(t transport, ourID NodeID, ourAddr *net.UDPAddr, nodeDBPath string) *Table {
- // If no seed cache was given, use an in-memory one
+ // If no node database was given, use an in-memory one
db, err := newNodeDB(nodeDBPath)
if err != nil {
glog.V(logger.Warn).Infoln("Failed to open node database:", err)
db, _ = newNodeDB("")
}
- // Create the bootstrap table
tab := &Table{
net: t,
db: db,
@@ -90,7 +89,7 @@ func (tab *Table) Self() *Node {
return tab.self
}
-// Close terminates the network listener and flushes the seed cache.
+// Close terminates the network listener and flushes the node database.
func (tab *Table) Close() {
tab.net.close()
tab.db.close()