aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api/wallet.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-02-02 19:32:01 +0200
committerRiccardo Spagni <ric@spagni.net>2017-02-02 19:32:01 +0200
commit5fb3f97a55a9b8f31a69119c41557a9774deffb5 (patch)
treeabf27b7fd1bf7fc164ce91f5179dbddf899112db /src/wallet/api/wallet.cpp
parentMerge pull request #1628 (diff)
parentUpdates to epee HTTP client code (diff)
downloadmonero-5fb3f97a55a9b8f31a69119c41557a9774deffb5.tar.xz
Merge pull request #1629
c02e1cb9 Updates to epee HTTP client code - http_simple_client now uses std::chrono for timeouts - http_simple_client accepts timeouts per connect / invoke call - shortened names of epee http invoke functions - invoke command functions only take relative path, connection is not automatically performed (Lee Clagett)
Diffstat (limited to 'src/wallet/api/wallet.cpp')
-rw-r--r--src/wallet/api/wallet.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
index c1cc5d10d..9e40d2e02 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -646,12 +646,12 @@ string WalletImpl::keysFilename() const
bool WalletImpl::init(const std::string &daemon_address, uint64_t upper_transaction_size_limit)
{
clearStatus();
- doInit(daemon_address, upper_transaction_size_limit);
+ if (!doInit(daemon_address, upper_transaction_size_limit))
+ return false;
bool result = this->refresh();
// enabling background refresh thread
startRefresh();
return result;
-
}
void WalletImpl::initAsync(const string &daemon_address, uint64_t upper_transaction_size_limit)
@@ -1362,9 +1362,10 @@ bool WalletImpl::isNewWallet() const
return !(blockChainHeight() > 1 || m_recoveringFromSeed || m_rebuildWalletCache) && !watchOnly();
}
-void WalletImpl::doInit(const string &daemon_address, uint64_t upper_transaction_size_limit)
+bool WalletImpl::doInit(const string &daemon_address, uint64_t upper_transaction_size_limit)
{
- m_wallet->init(daemon_address, upper_transaction_size_limit);
+ if (!m_wallet->init(daemon_address, upper_transaction_size_limit))
+ return false;
// in case new wallet, this will force fast-refresh (pulling hashes instead of blocks)
// If daemon isn't synced a calculated block height will be used instead
@@ -1383,8 +1384,7 @@ void WalletImpl::doInit(const string &daemon_address, uint64_t upper_transaction
this->setTrustedDaemon(false);
m_refreshIntervalMillis = DEFAULT_REMOTE_NODE_REFRESH_INTERVAL_MILLIS;
}
-
-
+ return true;
}
bool WalletImpl::parse_uri(const std::string &uri, std::string &address, std::string &payment_id, uint64_t &amount, std::string &tx_description, std::string &recipient_name, std::vector<std::string> &unknown_parameters, std::string &error)