aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api/wallet.cpp
diff options
context:
space:
mode:
authorJaquee <jaquee.monero@gmail.com>2017-01-08 13:47:13 +0100
committerJaquee <jaquee.monero@gmail.com>2017-01-10 22:49:30 +0100
commit0d3918e15bc01589cf7aaf50faf0ba615f07298c (patch)
treef287b4912156632b12f2cd67d4c8d8ccdf1f5383 /src/wallet/api/wallet.cpp
parentGUI cold signing (diff)
downloadmonero-0d3918e15bc01589cf7aaf50faf0ba615f07298c.tar.xz
Wallet api: Update trustedDaemon when daemon is changed
Diffstat (limited to 'src/wallet/api/wallet.cpp')
-rw-r--r--src/wallet/api/wallet.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
index 2159abd5c..10a75d4c9 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -52,6 +52,8 @@ namespace {
static const int DEFAULT_REFRESH_INTERVAL_MILLIS = 1000 * 10;
// limit maximum refresh interval as one minute
static const int MAX_REFRESH_INTERVAL_MILLIS = 1000 * 60 * 1;
+ // Default refresh interval when connected to remote node
+ static const int DEFAULT_REMOTE_NODE_REFRESH_INTERVAL_MILLIS = 1000 * 10;
}
struct Wallet2CallbackImpl : public tools::i_wallet2_callback
@@ -1186,6 +1188,10 @@ void WalletImpl::doInit(const string &daemon_address, uint64_t upper_transaction
if (Utils::isAddressLocal(daemon_address)) {
this->setTrustedDaemon(true);
+ m_refreshIntervalMillis = DEFAULT_REFRESH_INTERVAL_MILLIS;
+ } else {
+ this->setTrustedDaemon(false);
+ m_refreshIntervalMillis = DEFAULT_REMOTE_NODE_REFRESH_INTERVAL_MILLIS;
}