Replicator now uses its keypair for gossip

This commit is contained in:
Michael Vines 2019-03-06 17:16:00 -08:00
parent 8f034280dc
commit 07a948a0d0
2 changed files with 4 additions and 3 deletions

View File

@ -110,7 +110,7 @@ impl Replicator {
ledger_path: &str,
node: Node,
leader_info: &NodeInfo,
keypair: &Keypair,
keypair: &Arc<Keypair>,
timeout: Option<Duration>,
) -> Result<Self> {
let exit = Arc::new(AtomicBool::new(false));
@ -212,7 +212,7 @@ impl Replicator {
let mut client = mk_client(&leader);
Self::get_airdrop_lamports(&mut client, keypair, &leader_info);
Self::get_airdrop_lamports(&mut client, &keypair, &leader_info);
info!("Done downloading ledger at {}", ledger_path);
let ledger_path = Path::new(ledger_path);

View File

@ -81,7 +81,8 @@ fn main() {
let leader_info = NodeInfo::new_entry_point(&network_addr);
let replicator = Replicator::new(ledger_path, node, &leader_info, &keypair, None).unwrap();
let replicator =
Replicator::new(ledger_path, node, &leader_info, &Arc::new(keypair), None).unwrap();
replicator.join();
}