mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
fix: avoid lock annotation for govman.cs in voteraw
This commit is contained in:
parent
07aa0961c4
commit
982fc9a069
@ -955,14 +955,14 @@ static RPCHelpMan voteraw()
|
|||||||
|
|
||||||
const NodeContext& node = EnsureAnyNodeContext(request.context);
|
const NodeContext& node = EnsureAnyNodeContext(request.context);
|
||||||
CHECK_NONFATAL(node.govman);
|
CHECK_NONFATAL(node.govman);
|
||||||
GovernanceObject govObjType = WITH_LOCK(node.govman->cs, return [&](){
|
GovernanceObject govObjType = [&]() {
|
||||||
AssertLockHeld(node.govman->cs);
|
LOCK(node.govman->cs);
|
||||||
const CGovernanceObject *pGovObj = node.govman->FindConstGovernanceObject(hashGovObj);
|
const CGovernanceObject *pGovObj = node.govman->FindConstGovernanceObject(hashGovObj);
|
||||||
if (!pGovObj) {
|
if (!pGovObj) {
|
||||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Governance object not found");
|
throw JSONRPCError(RPC_INVALID_PARAMETER, "Governance object not found");
|
||||||
}
|
}
|
||||||
return pGovObj->GetObjectType();
|
return pGovObj->GetObjectType();
|
||||||
}());
|
}();
|
||||||
|
|
||||||
|
|
||||||
int64_t nTime = request.params[5].get_int64();
|
int64_t nTime = request.params[5].get_int64();
|
||||||
|
Loading…
Reference in New Issue
Block a user