aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorIlya Kitaev <mbg033@gmail.com>2016-09-26 23:39:30 +0300
committerIlya Kitaev <mbg033@gmail.com>2016-09-26 23:46:07 +0300
commitcda4cb969a1d0430c8256075ff2d479e9ad8145c (patch)
treeae642ba6c717fbce106f202cce2177ffe1c18108 /src/wallet
parentformatting: 2-spaces indentation (diff)
downloadmonero-cda4cb969a1d0430c8256075ff2d479e9ad8145c.tar.xz
formatting: 2-spaces indentation
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet2.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index ea50ae10c..80513b519 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -4055,30 +4055,30 @@ std::string wallet2::get_daemon_address() const
uint64_t wallet2::get_daemon_blockchain_height(string &err)
{
- // XXX: DRY violation. copy-pasted from simplewallet.cpp:get_daemon_blockchain_height()
- // consider to move it from simplewallet to wallet2 ?
- COMMAND_RPC_GET_HEIGHT::request req;
- COMMAND_RPC_GET_HEIGHT::response res = boost::value_initialized<COMMAND_RPC_GET_HEIGHT::response>();
- m_daemon_rpc_mutex.lock();
- bool ok = net_utils::invoke_http_json_remote_command2(m_daemon_address + "/getheight", req, res, m_http_client);
- m_daemon_rpc_mutex.unlock();
- // XXX: DRY violation. copy-pasted from simplewallet.cpp:interpret_rpc_response()
- if (ok)
+ // XXX: DRY violation. copy-pasted from simplewallet.cpp:get_daemon_blockchain_height()
+ // consider to move it from simplewallet to wallet2 ?
+ COMMAND_RPC_GET_HEIGHT::request req;
+ COMMAND_RPC_GET_HEIGHT::response res = boost::value_initialized<COMMAND_RPC_GET_HEIGHT::response>();
+ m_daemon_rpc_mutex.lock();
+ bool ok = net_utils::invoke_http_json_remote_command2(m_daemon_address + "/getheight", req, res, m_http_client);
+ m_daemon_rpc_mutex.unlock();
+ // XXX: DRY violation. copy-pasted from simplewallet.cpp:interpret_rpc_response()
+ if (ok)
+ {
+ if (res.status == CORE_RPC_STATUS_BUSY)
{
- if (res.status == CORE_RPC_STATUS_BUSY)
- {
- err = "daemon is busy. Please try again later.";
- }
- else if (res.status != CORE_RPC_STATUS_OK)
- {
- err = res.status;
- }
+ err = "daemon is busy. Please try again later.";
}
- else
+ else if (res.status != CORE_RPC_STATUS_OK)
{
- err = "possibly lost connection to daemon";
+ err = res.status;
}
- return res.height;
+ }
+ else
+ {
+ err = "possibly lost connection to daemon";
+ }
+ return res.height;
}
void wallet2::set_tx_note(const crypto::hash &txid, const std::string &note)