Cleanup replicator sockets
Add optional UdpSocket for storage interface. Add new_localhost_replicator to create a new replicator local node.
This commit is contained in:
committed by
sakridge
parent
1be7ee51be
commit
07f4dd385d
@@ -122,13 +122,20 @@ impl Replicator {
|
||||
#[allow(clippy::new_ret_no_self)]
|
||||
pub fn new(
|
||||
ledger_path: &str,
|
||||
node: Node,
|
||||
mut node: Node,
|
||||
cluster_entrypoint: ContactInfo,
|
||||
keypair: Arc<Keypair>,
|
||||
_timeout: Option<Duration>,
|
||||
) -> Result<Self> {
|
||||
let exit = Arc::new(AtomicBool::new(false));
|
||||
|
||||
// replicator cannot give information on rpc and
|
||||
// cannot be leader so tpu/rpc ports are cleared
|
||||
node.info.rpc = "0.0.0.0:0".parse().unwrap();
|
||||
node.info.rpc_pubsub = "0.0.0.0:0".parse().unwrap();
|
||||
node.info.tpu = "0.0.0.0:0".parse().unwrap();
|
||||
node.info.tpu_via_blobs = "0.0.0.0:0".parse().unwrap();
|
||||
|
||||
info!("Replicator: id: {}", keypair.pubkey());
|
||||
info!("Creating cluster info....");
|
||||
let mut cluster_info = ClusterInfo::new(node.info.clone(), keypair.clone());
|
||||
|
Reference in New Issue
Block a user