From dbfb33abe0dc57849975d9be25218907296a9954 Mon Sep 17 00:00:00 2001 From: Ross Nicoll Date: Sat, 13 Jul 2019 19:11:28 +0000 Subject: [PATCH] Revert behaviour change in getauxblock Change getauxblock to respond with a "target" field instead of "_target". --- configure.ac | 2 +- qa/rpc-tests/getauxblock.py | 2 +- src/rpc/mining.cpp | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 89d7cc09d..b1990eac4 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 1) define(_CLIENT_VERSION_MINOR, 14) -define(_CLIENT_VERSION_REVISION, 0) +define(_CLIENT_VERSION_REVISION, 1) define(_CLIENT_VERSION_BUILD, 0) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2019) diff --git a/qa/rpc-tests/getauxblock.py b/qa/rpc-tests/getauxblock.py index b24cf45eb..cb44383e8 100755 --- a/qa/rpc-tests/getauxblock.py +++ b/qa/rpc-tests/getauxblock.py @@ -25,7 +25,7 @@ class GetAuxBlockTest (BitcoinTestFramework): assert_equal (auxblock['previousblockhash'], blocktemplate['previousblockhash']) # Compare target and take byte order into account. - target = auxblock['_target'] + target = auxblock['target'] reversedTarget = auxpow.reverseHex (target) assert_equal (reversedTarget, blocktemplate['target']) diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 661177dea..e0c6708d2 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -474,10 +474,10 @@ UniValue getblocktemplate(const JSONRPCRequest& request) throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled"); if (g_connman->GetNodeCount(CConnman::CONNECTIONS_ALL) == 0) - throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Bitcoin is not connected!"); + throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Dogecoin is not connected!"); if (IsInitialBlockDownload()) - throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Bitcoin is downloading blocks..."); + throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Dogecoin is downloading blocks..."); static unsigned int nTransactionsUpdatedLast; @@ -958,7 +958,7 @@ UniValue getauxblockbip22(const JSONRPCRequest& request) " \"coinbasevalue\" (numeric) value of the block's coinbase\n" " \"bits\" (string) compressed target of the block\n" " \"height\" (numeric) height of the block\n" - " \"_target\" (string) target in reversed byte order, deprecated\n" + " \"target\" (string) target in reversed byte order\n" "}\n" "\nResult (with arguments):\n" "xxxxx (boolean) whether the submitted block was correct\n" @@ -1065,7 +1065,7 @@ UniValue getauxblockbip22(const JSONRPCRequest& request) result.push_back(Pair("coinbasevalue", (int64_t)pblock->vtx[0]->vout[0].nValue)); result.push_back(Pair("bits", strprintf("%08x", pblock->nBits))); result.push_back(Pair("height", static_cast (pindexPrev->nHeight + 1))); - result.push_back(Pair("_target", HexStr(BEGIN(target), END(target)))); + result.push_back(Pair("target", HexStr(BEGIN(target), END(target)))); return result; }