Browse Source

Merge #9087: RPC: why not give more details when "generate" fails?

1adf82a RPC: Give more details when "generate" fails (Jorge Timón)
tags/v0.15.1
MarcoFalke 3 years ago
parent
commit
924de0bd75
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/rpc/mining.cpp

+ 1
- 1
src/rpc/mining.cpp View File

@@ -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());


Loading…
Cancel
Save