mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-26 23:04:39 +00:00
Merge pull request #3727
e69a587 RPC: submitblock: Support for returning specific rejection reasons (Luke Dashjr)
This commit is contained in:
commit
ff17816abf
@ -593,7 +593,12 @@ Value submitblock(const Array& params, bool fHelp)
|
|||||||
throw JSONRPCError(RPC_VERIFY_ERROR, strRejectReason);
|
throw JSONRPCError(RPC_VERIFY_ERROR, strRejectReason);
|
||||||
}
|
}
|
||||||
if (state.IsInvalid())
|
if (state.IsInvalid())
|
||||||
return "rejected"; // TODO: report validation state
|
{
|
||||||
|
std::string strRejectReason = state.GetRejectReason();
|
||||||
|
if (strRejectReason.empty())
|
||||||
|
return "rejected";
|
||||||
|
return strRejectReason;
|
||||||
|
}
|
||||||
|
|
||||||
return Value::null;
|
return Value::null;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user