mirror of
https://github.com/jwinterm/wownero.git
synced 2026-11-27 11:14:11 +01:00
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user