From 07a948a0d097cea12a47e66fd389cf3a0d3e8ea5 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Wed, 6 Mar 2019 17:16:00 -0800 Subject: [PATCH] Replicator now uses its keypair for gossip --- core/src/replicator.rs | 4 ++-- replicator/src/main.rs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/replicator.rs b/core/src/replicator.rs index 2fed6f6b4..cc8019dd7 100644 --- a/core/src/replicator.rs +++ b/core/src/replicator.rs @@ -110,7 +110,7 @@ impl Replicator { ledger_path: &str, node: Node, leader_info: &NodeInfo, - keypair: &Keypair, + keypair: &Arc, timeout: Option, ) -> Result { 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); diff --git a/replicator/src/main.rs b/replicator/src/main.rs index 36ab1a4b1..6ab7a918e 100644 --- a/replicator/src/main.rs +++ b/replicator/src/main.rs @@ -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(); }