diff options
Diffstat (limited to 'src')
-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 0be4e06164..879a504115 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -593,7 +593,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; } |