From ed30db713c9bd91166fbd06b676b9f05ed1faad9 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Thu, 25 Apr 2019 18:37:08 +0300 Subject: [PATCH] Ensure wallet is available and unlocked for some `governance` and `evo` RPCs (#2874) * Ensure wallet is available and unlocked for specific governance rpc commands * Ensure wallet is available and unlocked for specific protx rpc commands Do this in actual rpc command handlers, not in the top protx rpc * Fix few pwalletMain occurrences in rpc --- src/rpc/governance.cpp | 39 ++++++++++++-------- src/rpc/rpcevo.cpp | 82 +++++++++++++++++++++++++----------------- 2 files changed, 74 insertions(+), 47 deletions(-) diff --git a/src/rpc/governance.cpp b/src/rpc/governance.cpp index b951737e6..ce228ed0f 100644 --- a/src/rpc/governance.cpp +++ b/src/rpc/governance.cpp @@ -116,11 +116,12 @@ UniValue gobject_check(const JSONRPCRequest& request) } #ifdef ENABLE_WALLET -void gobject_prepare_help() +void gobject_prepare_help(CWallet* const pwallet) { throw std::runtime_error( "gobject prepare