Browse Source

remove public addr book funcs from pex

pull/456/head
Ethan Buchman 8 years ago
parent
commit
88b5c724f2
2 changed files with 1 additions and 10 deletions
  1. +1
    -0
      addrbook.go
  2. +0
    -10
      pex_reactor.go

+ 1
- 0
addrbook.go View File

@ -153,6 +153,7 @@ func (a *AddrBook) OurAddresses() []*NetAddress {
return addrs
}
// NOTE: addr must not be nil
func (a *AddrBook) AddAddress(addr *NetAddress, src *NetAddress) {
a.mtx.Lock()
defer a.mtx.Unlock()


+ 0
- 10
pex_reactor.go View File

@ -130,16 +130,6 @@ func (pexR *PEXReactor) SendAddrs(peer *Peer, addrs []*NetAddress) {
peer.Send(PexChannel, struct{ PexMessage }{&pexAddrsMessage{Addrs: addrs}})
}
// SaveAddrBook saves underlying address book
func (r *PEXReactor) SaveAddrBook() {
r.book.Save()
}
// AddPeerAddress adds raw NetAddress to the address book
func (r *PEXReactor) AddPeerAddress(peerAddr, srcAddr *NetAddress) {
r.book.AddAddress(peerAddr, srcAddr)
}
// Ensures that sufficient peers are connected. (continuous)
func (pexR *PEXReactor) ensurePeersRoutine() {
// Randomize when routine starts


Loading…
Cancel
Save