Add test for replicator ledger download

Add an interface to query the storage slot a
  replicator is holding on storage_addr port.
Fix logic to poll blocktree for all slots
  replicated being filled.
Add test logic to ask replicator what slot it
  is replicating and then download an entry in
  the slot.
This commit is contained in:
Stephen Akridge
2019-03-14 12:57:02 -07:00
committed by sakridge
parent 07f4dd385d
commit ee58c1f960
4 changed files with 215 additions and 28 deletions

View File

@ -65,8 +65,8 @@ pub fn discover(gossip_addr: &SocketAddr, num_nodes: usize) -> std::io::Result<V
let now = Instant::now();
let mut i = 0;
while now.elapsed() < Duration::from_secs(30) {
let rpc_peers = spy_ref.read().unwrap().rpc_peers();
if rpc_peers.len() >= num_nodes {
let tvu_peers = spy_ref.read().unwrap().tvu_peers();
if tvu_peers.len() >= num_nodes {
info!(
"discover success in {}s...\n{}",
now.elapsed().as_secs(),
@ -75,7 +75,7 @@ pub fn discover(gossip_addr: &SocketAddr, num_nodes: usize) -> std::io::Result<V
exit.store(true, Ordering::Relaxed);
gossip_service.join().unwrap();
return Ok(rpc_peers);
return Ok(tvu_peers);
}
if i % 20 == 0 {
info!(