Optional Embedded params

This commit is contained in:
Aditya Kulkarni 2020-05-25 21:40:11 -07:00
parent 628ddca1f6
commit a7827f9163

View File

@ -354,9 +354,9 @@ impl LightClient {
}; };
l.set_wallet_initial_state(0); l.set_wallet_initial_state(0);
if cfg!(feature = "embed_params") {
l.read_sapling_params(); #[cfg(feature = "embed_params")]
} l.read_sapling_params();
info!("Created new wallet!"); info!("Created new wallet!");
info!("Created LightClient to {}", &config.server); info!("Created LightClient to {}", &config.server);
@ -385,9 +385,9 @@ impl LightClient {
}; };
l.set_wallet_initial_state(latest_block); l.set_wallet_initial_state(latest_block);
if cfg!(feature = "embed_params") {
l.read_sapling_params(); #[cfg(feature = "embed_params")]
} l.read_sapling_params();
info!("Created new wallet with a new seed!"); info!("Created new wallet with a new seed!");
info!("Created LightClient to {}", &config.server); info!("Created LightClient to {}", &config.server);
@ -418,9 +418,9 @@ impl LightClient {
println!("Setting birthday to {}", birthday); println!("Setting birthday to {}", birthday);
l.set_wallet_initial_state(birthday); l.set_wallet_initial_state(birthday);
if cfg!(feature = "embed_params") {
l.read_sapling_params(); #[cfg(feature = "embed_params")]
} l.read_sapling_params();
info!("Created new wallet!"); info!("Created new wallet!");
info!("Created LightClient to {}", &config.server); info!("Created LightClient to {}", &config.server);
@ -442,9 +442,8 @@ impl LightClient {
sync_status : Arc::new(RwLock::new(WalletStatus::new())), sync_status : Arc::new(RwLock::new(WalletStatus::new())),
}; };
if cfg!(feature = "embed_params") { #[cfg(feature = "embed_params")]
lc.read_sapling_params(); lc.read_sapling_params();
}
info!("Read wallet with birthday {}", lc.wallet.read().unwrap().get_first_tx_block()); info!("Read wallet with birthday {}", lc.wallet.read().unwrap().get_first_tx_block());
info!("Created LightClient to {}", &config.server); info!("Created LightClient to {}", &config.server);
@ -470,9 +469,8 @@ impl LightClient {
sync_status : Arc::new(RwLock::new(WalletStatus::new())), sync_status : Arc::new(RwLock::new(WalletStatus::new())),
}; };
if cfg!(feature = "embed_params") { #[cfg(feature = "embed_params")]
lc.read_sapling_params(); lc.read_sapling_params();
}
info!("Read wallet with birthday {}", lc.wallet.read().unwrap().get_first_tx_block()); info!("Read wallet with birthday {}", lc.wallet.read().unwrap().get_first_tx_block());
info!("Created LightClient to {}", &config.server); info!("Created LightClient to {}", &config.server);