From 3772910bf21886d68b710fa5079324b6b60e6d3e Mon Sep 17 00:00:00 2001 From: Greg Fitzgerald Date: Fri, 9 Nov 2018 17:03:53 -0700 Subject: [PATCH] Boot rpc_port --- src/bin/wallet.rs | 14 -------------- src/wallet.rs | 18 ++++++------------ 2 files changed, 6 insertions(+), 26 deletions(-) diff --git a/src/bin/wallet.rs b/src/bin/wallet.rs index f56b2568e2..31bd93bcd8 100644 --- a/src/bin/wallet.rs +++ b/src/bin/wallet.rs @@ -6,7 +6,6 @@ extern crate solana; use clap::{App, Arg, ArgMatches, SubCommand}; use solana::logger; -use solana::rpc::RPC_PORT; use solana::signature::{read_keypair, KeypairUtil}; use solana::wallet::{gen_keypair_file, parse_command, process_command, WalletConfig, WalletError}; use std::error; @@ -30,12 +29,6 @@ pub fn parse_args(matches: &ArgMatches) -> Result Result Result<(), Box> { .value_name("SECS") .takes_value(true) .help("Max seconds to wait to get necessary gossip from the network"), - ).arg( - Arg::with_name("rpc-port") - .long("port") - .takes_value(true) - .value_name("NUM") - .help("Optional rpc-port configuration to connect to non-default nodes") ).arg( Arg::with_name("proxy") .long("proxy") diff --git a/src/wallet.rs b/src/wallet.rs index f7d61b4a64..78497661fd 100644 --- a/src/wallet.rs +++ b/src/wallet.rs @@ -89,7 +89,6 @@ pub struct WalletConfig { pub network: SocketAddr, pub timeout: Option, pub proxy: Option, - pub rpc_port: u16, } impl Default for WalletConfig { @@ -101,7 +100,6 @@ impl Default for WalletConfig { network: default_addr, timeout: None, proxy: None, - rpc_port: 0, } } } @@ -112,13 +110,6 @@ impl WalletConfig { drone_addr.set_port(DRONE_PORT); drone_addr } - - pub fn rpc_addr(&self, tpu_addr: SocketAddr) -> String { - let mut rpc_addr = tpu_addr; - rpc_addr.set_port(self.rpc_port); - let rpc_addr_str = format!("http://{}", rpc_addr.to_string()); - self.proxy.clone().unwrap_or(rpc_addr_str) - } } pub fn parse_command( @@ -319,9 +310,12 @@ pub fn process_command(config: &WalletConfig) -> Result