Browse Source

create addrbook even if pex=false. fixes #1525

pull/1519/head
Ethan Buchman 6 years ago
parent
commit
47557f868a
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      node/node.go

+ 3
- 3
node/node.go View File

@ -274,11 +274,11 @@ func NewNode(config *cfg.Config,
// if auth_enc=false.
//
// If PEX is on, it should handle dialing the seeds. Otherwise the switch does it.
// Note we currently use the addrBook regardless at least for AddOurAddress
var addrBook pex.AddrBook
addrBook = pex.NewAddrBook(config.P2P.AddrBookFile(), config.P2P.AddrBookStrict)
addrBook.SetLogger(p2pLogger.With("book", config.P2P.AddrBookFile()))
if config.P2P.PexReactor {
addrBook = pex.NewAddrBook(config.P2P.AddrBookFile(), config.P2P.AddrBookStrict)
addrBook.SetLogger(p2pLogger.With("book", config.P2P.AddrBookFile()))
// TODO persistent peers ? so we can have their DNS addrs saved
pexReactor := pex.NewPEXReactor(addrBook,
&pex.PEXReactorConfig{


Loading…
Cancel
Save