diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index fd83bea43..12c7496e3 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -922,7 +922,7 @@ UniValue estimatesmartpriority(const JSONRPCRequest& request) /* ************************************************************************** */ /* Merge mining. */ -UniValue getauxblock(const JSONRPCRequest& request) +UniValue getauxblockbip22(const JSONRPCRequest& request) { if (request.fHelp || (request.params.size() != 0 && request.params.size() != 2)) @@ -1088,6 +1088,18 @@ UniValue getauxblock(const JSONRPCRequest& request) return BIP22ValidationResult(sc.state); } +UniValue getauxblock(const JSONRPCRequest& request) +{ + const UniValue response = getauxblockbip22(request); + + // this is a request for a new blocktemplate: return response + if (request.params.size() == 0) + return response; + + // this is a new block submission: return bool + return response.isNull(); +} + /* ************************************************************************** */ static const CRPCCommand commands[] =