Skip to content

Commit

Permalink
Merge bitcoin#9087: RPC: why not give more details when "generate" fa…
Browse files Browse the repository at this point in the history
…ils?

1adf82a RPC: Give more details when "generate" fails (Jorge Timón)
  • Loading branch information
MarcoFalke committed Nov 8, 2016
2 parents 4e57824 + 1adf82a commit 924de0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rpc/mining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down

0 comments on commit 924de0b

Please sign in to comment.