mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-29 16:24:22 +00:00
RPC: Give more details when "generate" fails
This commit is contained in:
parent
4e5782438c
commit
1adf82ac39
@ -133,7 +133,7 @@ UniValue generateBlocks(boost::shared_ptr<CReserveScript> coinbaseScript, int nG
|
|||||||
}
|
}
|
||||||
CValidationState state;
|
CValidationState state;
|
||||||
if (!ProcessNewBlock(state, Params(), NULL, pblock, true, NULL, false))
|
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;
|
++nHeight;
|
||||||
blockHashes.push_back(pblock->GetHash().GetHex());
|
blockHashes.push_back(pblock->GetHash().GetHex());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user