mirror of
https://github.com/monero-project/monero.git
synced 2025-05-25 12:30:54 -04:00
wallet: optional automatic refresh from the daemon
The daemon will be polled every 90 seconds for new blocks. It is enabled by default, and can be turned on/off with set auto-refresh 1 and set auto-refresh 0 in the wallet.
This commit is contained in:
parent
4061a32082
commit
62e49a5f02
5 changed files with 143 additions and 20 deletions
|
@ -744,6 +744,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);
|
||||
|
@ -828,6 +831,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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue