aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/mining.cpp
diff options
context:
space:
mode:
authorMarcoFalke <[email protected]>2016-11-08 15:55:41 +0100
committerMarcoFalke <[email protected]>2016-11-08 15:55:53 +0100
commit924de0bd75a7f75df65d7d15f9d1587a2e794abf (patch)
tree08e5c97d6a4d16448dde354cd4b6c2adb82d5454 /src/rpc/mining.cpp
parentMerge #9088: Reduce ambiguity of warning message (diff)
parentRPC: Give more details when "generate" fails (diff)
downloaddiscoin-924de0bd75a7f75df65d7d15f9d1587a2e794abf.tar.xz
discoin-924de0bd75a7f75df65d7d15f9d1587a2e794abf.zip
Merge #9087: RPC: why not give more details when "generate" fails?
1adf82a RPC: Give more details when "generate" fails (Jorge Timón)
Diffstat (limited to 'src/rpc/mining.cpp')
-rw-r--r--src/rpc/mining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp
index 3e91a79a6..8824898fe 100644
--- a/src/rpc/mining.cpp
+++ b/src/rpc/mining.cpp
@@ -133,7 +133,7 @@ UniValue generateBlocks(boost::shared_ptr<CReserveScript> coinbaseScript, int nG
}
CValidationState state;
if (!ProcessNewBlock(state, Params(), NULL, pblock, true, NULL, false))
- throw JSONRPCError(RPC_INTERNAL_ERROR, "ProcessNewBlock, block not accepted");
+ throw JSONRPCError(RPC_INTERNAL_ERROR, strprintf("ProcessNewBlock: block not accepted: %s", FormatStateMessage(state)));
++nHeight;
blockHashes.push_back(pblock->GetHash().GetHex());