expose 2 API functions for tendermint#node/node.go
This commit is contained in:
parent
108beae7a8
commit
65b1756978
|
@ -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…
Reference in New Issue