diff options
author | Riccardo Spagni <ric@spagni.net> | 2015-11-30 00:19:44 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2015-11-30 00:19:47 +0200 |
commit | bc1bc4adb246b08adee2144ce2c7e3784f7899f1 (patch) | |
tree | 297f1fde9102ffe8a76f84a9e4e4bdd181224f27 /src/wallet/wallet2.cpp | |
parent | Merge pull request #506 (diff) | |
parent | wallet: optional automatic refresh from the daemon (diff) | |
download | monero-bc1bc4adb246b08adee2144ce2c7e3784f7899f1.tar.xz |
Merge pull request #507
62e49a5 wallet: optional automatic refresh from the daemon (moneromooo-monero)
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r-- | src/wallet/wallet2.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 6136480d6..8a172be90 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -822,6 +822,9 @@ bool wallet2::store_keys(const std::string& keys_file_name, const std::string& p value2.SetUint(m_default_mixin); json.AddMember("default_mixin", value2, json.GetAllocator()); + value2.SetInt(m_auto_refresh ? 1 :0); + json.AddMember("auto_refresh", value2, json.GetAllocator()); + // Serialize the JSON object rapidjson::StringBuffer buffer; rapidjson::Writer<rapidjson::StringBuffer> writer(buffer); @@ -906,6 +909,7 @@ void wallet2::load_keys(const std::string& keys_file_name, const std::string& pa m_store_tx_info = (json.HasMember("store_tx_keys") && (json["store_tx_keys"].GetInt() != 0)) || (json.HasMember("store_tx_info") && (json["store_tx_info"].GetInt() != 0)); m_default_mixin = json.HasMember("default_mixin") ? json["default_mixin"].GetUint() : 0; + m_auto_refresh = json.HasMember("auto_refresh") && (json["auto_refresh"].GetInt() != 0); } const cryptonote::account_keys& keys = m_account.get_keys(); |