aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-11-28 12:38:58 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-11-28 12:41:06 +0000
commit62e49a5f02da0963fb0303383626b2c86443d405 (patch)
treef98be933b63426d26cd3b91be7cc0db8106467d5 /src/wallet/wallet2.h
parentMerge pull request #501 (diff)
downloadmonero-62e49a5f02da0963fb0303383626b2c86443d405.tar.xz
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.
Diffstat (limited to 'src/wallet/wallet2.h')
-rw-r--r--src/wallet/wallet2.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
index e036020b8..79fd2da49 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -87,10 +87,10 @@ namespace tools
};
private:
- wallet2(const wallet2&) : m_run(true), m_callback(0), m_testnet(false), m_always_confirm_transfers (false), m_store_tx_info(true), m_default_mixin(0), m_refresh_type(RefreshOptimizeCoinbase) {}
+ wallet2(const wallet2&) : m_run(true), m_callback(0), m_testnet(false), m_always_confirm_transfers (false), m_store_tx_info(true), m_default_mixin(0), m_refresh_type(RefreshOptimizeCoinbase), m_auto_refresh(true) {}
public:
- wallet2(bool testnet = false, bool restricted = false) : m_run(true), m_callback(0), m_testnet(testnet), m_restricted(restricted), is_old_file_format(false), m_store_tx_info(true), m_default_mixin(0), m_refresh_type(RefreshOptimizeCoinbase) {}
+ wallet2(bool testnet = false, bool restricted = false) : m_run(true), m_callback(0), m_testnet(testnet), m_restricted(restricted), is_old_file_format(false), m_store_tx_info(true), m_default_mixin(0), m_refresh_type(RefreshOptimizeCoinbase), m_auto_refresh(true) {}
struct transfer_details
{
uint64_t m_block_height;
@@ -330,6 +330,8 @@ namespace tools
void store_tx_info(bool store) { m_store_tx_info = store; }
uint32_t default_mixin() const { return m_default_mixin; }
void default_mixin(uint32_t m) { m_default_mixin = m; }
+ bool auto_refresh() const { return m_auto_refresh; }
+ void auto_refresh(bool r) { m_auto_refresh = r; }
bool get_tx_key(const crypto::hash &txid, crypto::secret_key &tx_key) const;
@@ -397,6 +399,7 @@ namespace tools
bool m_store_tx_info; /*!< request txkey to be returned in RPC, and store in the wallet cache file */
uint32_t m_default_mixin;
RefreshType m_refresh_type;
+ bool m_auto_refresh;
};
}
BOOST_CLASS_VERSION(tools::wallet2, 10)