cmd/bootnode, eth, p2p, p2p/discover: use a fancier db design

This commit is contained in:
Péter Szilágyi
2015-04-24 18:04:41 +03:00
parent 6def110c37
commit 8646365b42
9 changed files with 280 additions and 169 deletions

View File

@@ -59,9 +59,9 @@ type Server struct {
// with the rest of the network.
BootstrapNodes []*discover.Node
// SeedCache is the database containing the previously seen live nodes in
// the network to use as potential bootstrap seeds.
SeedCache *discover.Cache
// NodeDatabase is the path to the database containing the previously seen
// live nodes in the network.
NodeDatabase string
// Protocols should contain the protocols supported
// by the server. Matching protocols are launched for
@@ -201,7 +201,7 @@ func (srv *Server) Start() (err error) {
}
// node table
ntab, err := discover.ListenUDP(srv.PrivateKey, srv.ListenAddr, srv.NAT, srv.SeedCache)
ntab, err := discover.ListenUDP(srv.PrivateKey, srv.ListenAddr, srv.NAT, srv.NodeDatabase)
if err != nil {
return err
}