Add private peer ID tracking to AddrBook (#1989)

* Add private peer ID tracking to AddrBook

* Remove private peer tracking/blocking from pex

* debug level msg when we fail to add private address
This commit is contained in:
Jeremiah Andrews
2018-07-18 02:22:09 -07:00
committed by Anton Kaliaev
parent 449846ccb2
commit 6c4ca140ed
9 changed files with 62 additions and 36 deletions

View File

@ -295,7 +295,8 @@ func TestPEXReactorCrawlStatus(t *testing.T) {
func TestPEXReactorDoesNotAddPrivatePeersToAddrBook(t *testing.T) {
peer := p2p.CreateRandomPeer(false)
pexR, book := createReactor(&PEXReactorConfig{PrivatePeerIDs: []string{string(peer.NodeInfo().ID)}})
pexR, book := createReactor(&PEXReactorConfig{})
book.AddPrivateIDs([]string{string(peer.NodeInfo().ID)})
defer teardownReactor(book)
// we have to send a request to receive responses