Skip to content

Commit 8c49cae

Browse files
authored
Merge pull request #1 from zancas/migrate_DEFAULT_SERVER_into_zingoconfig
migrate DEFAULT_SERVER into config
2 parents 8bcad10 + f3cfcc7 commit 8c49cae

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

cli/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
use std::io::{self};
21
use std::sync::mpsc::{channel, Receiver, Sender};
32
use std::sync::Arc;
43

54
use log::{error, info};
65

7-
use zingoconfig::Network;
86
use zingolib::lightclient::lightclient_config::LightClientConfig;
97
use zingolib::{commands, lightclient::LightClient};
108

@@ -43,7 +41,7 @@ macro_rules! configure_clapapp {
4341
.value_name("server")
4442
.help("Lightwalletd server to connect to.")
4543
.takes_value(true)
46-
.default_value(lightclient::lightclient_config::DEFAULT_SERVER)
44+
.default_value(zingoconfig::DEFAULT_SERVER)
4745
.takes_value(true))
4846
.arg(Arg::with_name("data-dir")
4947
.long("data-dir")
@@ -90,7 +88,7 @@ pub fn startup(
9088
data_dir: Option<String>,
9189
first_sync: bool,
9290
print_updates: bool,
93-
) -> io::Result<(Sender<(String, Vec<String>)>, Receiver<String>)> {
91+
) -> std::io::Result<(Sender<(String, Vec<String>)>, Receiver<String>)> {
9492
// Try to get the configuration
9593
let (config, latest_block_height) =
9694
LightClientConfig::create_on_data_dir(server.clone(), data_dir)?;

config/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ use zcash_primitives::{
22
consensus::{BlockHeight, NetworkUpgrade, Parameters, MAIN_NETWORK, TEST_NETWORK},
33
constants,
44
};
5+
6+
pub const DEFAULT_SERVER: &str = "https://lwdv3.zecwallet.co";
57
pub const MAX_REORG: usize = 100;
68

79
#[derive(Clone, Copy, Debug, PartialEq)]

lib/src/lightclient/lightclient_config.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ use zcash_primitives::{
2323
};
2424

2525
use crate::{grpc_connector::GrpcConnector, lightclient::checkpoints};
26-
use zingoconfig::Network;
26+
use zingoconfig::{Network, DEFAULT_SERVER};
2727

28-
pub const DEFAULT_SERVER: &str = "https://lwdv3.zecwallet.co";
2928
pub const WALLET_NAME: &str = "zingo-wallet.dat";
3029
pub const LOGFILE_NAME: &str = "zingo-wallet.debug.log";
3130
pub const ANCHOR_OFFSET: [u32; 5] = [4, 0, 0, 0, 0];

0 commit comments

Comments
 (0)