mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-12-02 20:04:40 +01:00
TOR bridge + TOR Proxy + migration config_file_version (#617)
* tor bridge config and args * migration `config_file_version=2` * small fixes typo, comment etc.. * support: snowflake, meek_lite, obsf4 and tor proxy * remove useless serde * improve migrate function * few fixes * add bridge flags to pay and receive + few fixes * some improvements
This commit is contained in:
@@ -79,6 +79,10 @@ where
|
||||
tor_config: Option<TorConfig>,
|
||||
) -> Result<(), Error> {
|
||||
let mut default_config = GlobalWalletConfig::for_chain(&chain_type);
|
||||
let config_file_version = match default_config.members.as_ref() {
|
||||
Some(m) => m.clone().config_file_version,
|
||||
None => None,
|
||||
};
|
||||
let logging = match logging_config {
|
||||
Some(l) => Some(l),
|
||||
None => match default_config.members.as_ref() {
|
||||
@@ -102,6 +106,7 @@ where
|
||||
};
|
||||
default_config = GlobalWalletConfig {
|
||||
members: Some(GlobalWalletConfigMembers {
|
||||
config_file_version,
|
||||
wallet,
|
||||
tor,
|
||||
logging,
|
||||
@@ -139,7 +144,8 @@ where
|
||||
abs_path.push(self.data_dir.clone());
|
||||
|
||||
default_config.update_paths(&abs_path);
|
||||
let res = default_config.write_to_file(config_file_name.to_str().unwrap());
|
||||
let res =
|
||||
default_config.write_to_file(config_file_name.to_str().unwrap(), false, None, None);
|
||||
if let Err(e) = res {
|
||||
let msg = format!(
|
||||
"Error creating config file as ({}): {}",
|
||||
|
||||
Reference in New Issue
Block a user