Correctly remove replicator from data plane after its done repairing (#4301)

* Correctly remove replicator from data plane after its done repairing

* Update discover to report nodes and replicators separately

* Fix print and condition to be spy
This commit is contained in:
Sagar Dhawan
2019-05-16 07:14:58 -07:00
committed by GitHub
parent d40b66ff7b
commit a0ffbf50a5
12 changed files with 119 additions and 57 deletions

View File

@ -133,7 +133,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
Some(addr)
};
let nodes = discover(
let (nodes, _replicators) = discover(
&entrypoint_addr,
num_nodes,
timeout,
@ -174,7 +174,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
.unwrap()
.parse::<Pubkey>()
.unwrap();
let nodes = discover(&entrypoint_addr, None, None, Some(pubkey), None)?;
let (nodes, _replicators) = discover(&entrypoint_addr, None, None, Some(pubkey), None)?;
let node = nodes.iter().find(|x| x.id == pubkey).unwrap();
if !ContactInfo::is_valid_address(&node.rpc) {