diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-01-07 19:23:57 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-01-16 08:59:15 +0000 |
commit | 693c1908815d8574a1125288f0400eab5f5085a7 (patch) | |
tree | 1a93cdf9aaa7cddfcb5241214db82c6c4a1f92c0 /src/wallet/wallet_errors.h | |
parent | wallet2: reuse fake outs when adjusting fee on transfer (diff) | |
download | monero-693c1908815d8574a1125288f0400eab5f5085a7.tar.xz |
wallet: add a node RPC cache layer for simple RPC calls
Mostly getinfo and get_hard_fork_info, which are called
pretty often. This speeds up transfers as a bonus.
Diffstat (limited to '')
-rw-r--r-- | src/wallet/wallet_errors.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/wallet/wallet_errors.h b/src/wallet/wallet_errors.h index 93e7c2ec3..785a72e4b 100644 --- a/src/wallet/wallet_errors.h +++ b/src/wallet/wallet_errors.h @@ -626,6 +626,18 @@ namespace tools std::string m_request; }; //---------------------------------------------------------------------------------------------------- + struct wallet_generic_rpc_error : public wallet_rpc_error + { + explicit wallet_generic_rpc_error(std::string&& loc, const std::string& request, const std::string& status) + : wallet_rpc_error(std::move(loc), std::string("error in ") + request + " RPC: " + status, request), + m_status(status) + { + } + const std::string& status() const { return m_status; } + private: + const std::string m_status; + }; + //---------------------------------------------------------------------------------------------------- struct daemon_busy : public wallet_rpc_error { explicit daemon_busy(std::string&& loc, const std::string& request) |