Skip to content

Commit 924de0b

Browse files
author
MarcoFalke
committed
Merge bitcoin#9087: RPC: why not give more details when "generate" fails?
1adf82a RPC: Give more details when "generate" fails (Jorge Timón)
2 parents 4e57824 + 1adf82a commit 924de0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rpc/mining.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ UniValue generateBlocks(boost::shared_ptr<CReserveScript> coinbaseScript, int nG
133133
}
134134
CValidationState state;
135135
if (!ProcessNewBlock(state, Params(), NULL, pblock, true, NULL, false))
136-
throw JSONRPCError(RPC_INTERNAL_ERROR, "ProcessNewBlock, block not accepted");
136+
throw JSONRPCError(RPC_INTERNAL_ERROR, strprintf("ProcessNewBlock: block not accepted: %s", FormatStateMessage(state)));
137137
++nHeight;
138138
blockHashes.push_back(pblock->GetHash().GetHex());
139139

0 commit comments

Comments
 (0)