Browse Source

expose 2 API functions for tendermint#node/node.go

pull/456/head
Anton Kaliaev 8 years ago
committed by Ethan Buchman
parent
commit
65b1756978
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      pex_reactor.go

+ 10
- 0
pex_reactor.go View File

@ -130,6 +130,16 @@ 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