aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/server.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-04-23 23:47:24 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-04-24 16:23:20 +0800
commit5f735d6fce10b4552b0a6d3eb6503c5a302f4f61 (patch)
tree781d93a4c91ac664b95d97b96d3ac6605bfbb57c /p2p/server.go
parent936c8e19ff3db376fdd1ed53772c51c817a72112 (diff)
downloaddexon-5f735d6fce10b4552b0a6d3eb6503c5a302f4f61.tar
dexon-5f735d6fce10b4552b0a6d3eb6503c5a302f4f61.tar.gz
dexon-5f735d6fce10b4552b0a6d3eb6503c5a302f4f61.tar.bz2
dexon-5f735d6fce10b4552b0a6d3eb6503c5a302f4f61.tar.lz
dexon-5f735d6fce10b4552b0a6d3eb6503c5a302f4f61.tar.xz
dexon-5f735d6fce10b4552b0a6d3eb6503c5a302f4f61.tar.zst
dexon-5f735d6fce10b4552b0a6d3eb6503c5a302f4f61.zip
cmd, eth, p2p, p2p/discover: init and clean up the seed cache
Diffstat (limited to 'p2p/server.go')
-rw-r--r--p2p/server.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/p2p/server.go b/p2p/server.go
index ecf418d13..39b0b8b6e 100644
--- a/p2p/server.go
+++ b/p2p/server.go
@@ -59,6 +59,10 @@ type Server struct {
// with the rest of the network.
BootstrapNodes []*discover.Node
+ // SeedCache is the path to the database containing the previously seen live
+ // nodes in the network to use as potential bootstrap seeds.
+ SeedCache string
+
// Protocols should contain the protocols supported
// by the server. Matching protocols are launched for
// each peer.
@@ -197,7 +201,7 @@ func (srv *Server) Start() (err error) {
}
// node table
- ntab, err := discover.ListenUDP(srv.PrivateKey, srv.ListenAddr, srv.NAT)
+ ntab, err := discover.ListenUDP(srv.PrivateKey, srv.ListenAddr, srv.NAT, srv.SeedCache)
if err != nil {
return err
}