diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2012-09-10 02:02:35 +0000 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2014-10-30 02:03:43 +0000 |
commit | e69a5873e705b132b787415b375c206b1f615bac (patch) | |
tree | 92f2056b1b4877e0af9d9356f16c58a71dedbd4a /src/rpcmining.cpp | |
parent | 1bea2bbddce6abaf2640c4aab56ad08de53c4b90 (diff) |
RPC: submitblock: Support for returning specific rejection reasons
Diffstat (limited to 'src/rpcmining.cpp')
-rw-r--r-- | src/rpcmining.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index b063159721..6b390b1b95 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -592,7 +592,12 @@ Value submitblock(const Array& params, bool fHelp) throw JSONRPCError(RPC_VERIFY_ERROR, strRejectReason); } if (state.IsInvalid()) - return "rejected"; // TODO: report validation state + { + std::string strRejectReason = state.GetRejectReason(); + if (strRejectReason.empty()) + return "rejected"; + return strRejectReason; + } return Value::null; } |