Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
#include <masternode/activemasternode.h>
#include <consensus/validation.h>
#include <core_io.h>
#include <governance/governance.h>
#include <governance/governance-vote.h>
#include <governance/governance-classes.h>
#include <governance/governance-validators.h>
#include <init.h>
#include <txmempool.h>
#include <validation.h>
#include <masternode/masternode-sync.h>
#include <messagesigner.h>
#include <rpc/server.h>
#include <util.h>
#include <utilmoneystr.h>
#include <wallet/rpcwallet.h>
Go to the source code of this file.
Variables | |
static const CRPCCommand | commands [] |
Function Documentation
◆ getgovernanceinfo()
UniValue getgovernanceinfo | ( | const JSONRPCRequest & | request | ) |
Definition at line 1035 of file governance.cpp.
References chainActive, cs_main, CURRENCY_UNIT, JSONRPCRequest::fHelp, CSuperblock::GetNearestSuperblocksHeights(), GOVERNANCE_PROPOSAL_FEE_TX, CChain::Height(), HelpExampleCli(), HelpExampleRpc(), LOCK, Pair(), JSONRPCRequest::params, Params(), UniValue::push_back(), UniValue::size(), ValueFromAmount(), and UniValue::VOBJ.
◆ getsuperblockbudget()
UniValue getsuperblockbudget | ( | const JSONRPCRequest & | request | ) |
Definition at line 1072 of file governance.cpp.
References CURRENCY_UNIT, JSONRPCRequest::fHelp, UniValue::get_int(), CSuperblock::GetPaymentsLimit(), HelpExampleCli(), HelpExampleRpc(), JSONRPCError(), JSONRPCRequest::params, RPC_INVALID_PARAMETER, UniValue::size(), and ValueFromAmount().
◆ gobject()
UniValue gobject | ( | const JSONRPCRequest & | request | ) |
Definition at line 909 of file governance.cpp.
References JSONRPCRequest::fHelp, UniValue::get_str(), gobject_check(), gobject_count(), gobject_deserialize(), gobject_diff(), gobject_get(), gobject_getcurrentvotes(), gobject_help(), gobject_list(), gobject_submit(), gobject_vote_conf(), UniValue::isNull(), and JSONRPCRequest::params.
◆ gobject_check()
UniValue gobject_check | ( | const JSONRPCRequest & | request | ) |
Definition at line 88 of file governance.cpp.
References JSONRPCRequest::fHelp, UniValue::get_str(), GetAdjustedTime(), CProposalValidator::GetErrorMessages(), CGovernanceObject::GetObjectType(), gobject_check_help(), GOVERNANCE_OBJECT_PROPOSAL, JSONRPCError(), Pair(), JSONRPCRequest::params, UniValue::push_back(), RPC_INVALID_PARAMETER, UniValue::size(), CProposalValidator::Validate(), and UniValue::VOBJ.
Referenced by gobject().
◆ gobject_check_help()
void gobject_check_help | ( | ) |
Definition at line 78 of file governance.cpp.
Referenced by gobject_check().
◆ gobject_count()
UniValue gobject_count | ( | const JSONRPCRequest & | request | ) |
Definition at line 35 of file governance.cpp.
References JSONRPCRequest::fHelp, UniValue::get_str(), gobject_count_help(), governance, UniValue::isNull(), JSONRPCRequest::params, UniValue::size(), CGovernanceManager::ToJson(), and CGovernanceManager::ToString().
Referenced by gobject().
◆ gobject_count_help()
void gobject_count_help | ( | ) |
Definition at line 25 of file governance.cpp.
Referenced by gobject_count().
◆ gobject_deserialize()
UniValue gobject_deserialize | ( | const JSONRPCRequest & | request | ) |
Definition at line 62 of file governance.cpp.
References JSONRPCRequest::fHelp, UniValue::get_str(), gobject_deserialize_help(), JSONRPCRequest::params, ParseHex(), UniValue::size(), and UniValue::VOBJ.
Referenced by gobject().
◆ gobject_deserialize_help()
void gobject_deserialize_help | ( | ) |
Definition at line 52 of file governance.cpp.
Referenced by gobject_deserialize().
◆ gobject_diff()
UniValue gobject_diff | ( | const JSONRPCRequest & | request | ) |
Definition at line 722 of file governance.cpp.
References JSONRPCRequest::fHelp, UniValue::get_str(), CGovernanceManager::GetLastDiffTime(), gobject_diff_help(), governance, UniValue::isNull(), ListObjects(), JSONRPCRequest::params, and UniValue::size().
Referenced by gobject().
◆ gobject_diff_help()
void gobject_diff_help | ( | ) |
Definition at line 711 of file governance.cpp.
Referenced by gobject_diff().
◆ gobject_get()
UniValue gobject_get | ( | const JSONRPCRequest & | request | ) |
Definition at line 754 of file governance.cpp.
References CGovernanceManager::cs, cs_main, JSONRPCRequest::fHelp, CGovernanceManager::FindGovernanceObject(), CGovernanceObject::GetAbsoluteYesCount(), CGovernanceObject::GetAbstainCount(), CGovernanceObject::GetCollateralHash(), CGovernanceObject::GetCreationTime(), CGovernanceObject::GetDataAsHexString(), CGovernanceObject::GetDataAsPlainString(), CGovernanceObject::GetHash(), CGovernanceObject::GetMasternodeOutpoint(), CGovernanceObject::GetNoCount(), CGovernanceObject::GetObjectType(), CGovernanceObject::GetYesCount(), gobject_get_help(), governance, CGovernanceObject::IsSetCachedDelete(), CGovernanceObject::IsSetCachedEndorsed(), CGovernanceObject::IsSetCachedFunding(), CGovernanceObject::IsSetCachedValid(), CGovernanceObject::IsValidLocally(), JSONRPCError(), LOCK2, Pair(), JSONRPCRequest::params, ParseHashV(), UniValue::push_back(), RPC_INVALID_PARAMETER, UniValue::size(), base_blob< BITS >::ToString(), COutPoint::ToStringShort(), UniValue::VOBJ, VOTE_SIGNAL_DELETE, VOTE_SIGNAL_ENDORSED, VOTE_SIGNAL_FUNDING, and VOTE_SIGNAL_VALID.
Referenced by gobject().
◆ gobject_get_help()
void gobject_get_help | ( | ) |
Definition at line 744 of file governance.cpp.
Referenced by gobject_get().
◆ gobject_getcurrentvotes()
UniValue gobject_getcurrentvotes | ( | const JSONRPCRequest & | request | ) |
Definition at line 842 of file governance.cpp.
References atoi(), CGovernanceManager::cs, JSONRPCRequest::fHelp, CGovernanceManager::FindGovernanceObject(), UniValue::get_str(), CGovernanceManager::GetCurrentVotes(), gobject_getcurrentvotes_help(), governance, UniValue::isNull(), JSONRPCError(), LOCK, Pair(), JSONRPCRequest::params, ParseHashV(), UniValue::push_back(), RPC_INVALID_PARAMETER, UniValue::size(), and UniValue::VOBJ.
Referenced by gobject().
◆ gobject_getcurrentvotes_help()
void gobject_getcurrentvotes_help | ( | ) |
Definition at line 830 of file governance.cpp.
Referenced by gobject_getcurrentvotes().
◆ gobject_help()
void gobject_help | ( | ) |
Definition at line 882 of file governance.cpp.
Referenced by gobject().
◆ gobject_list()
UniValue gobject_list | ( | const JSONRPCRequest & | request | ) |
Definition at line 689 of file governance.cpp.
References JSONRPCRequest::fHelp, UniValue::get_str(), gobject_list_help(), UniValue::isNull(), ListObjects(), JSONRPCRequest::params, and UniValue::size().
Referenced by gobject().
◆ gobject_list_help()
void gobject_list_help | ( | ) |
Definition at line 678 of file governance.cpp.
Referenced by gobject_list().
◆ gobject_submit()
UniValue gobject_submit | ( | const JSONRPCRequest & | request | ) |
Definition at line 247 of file governance.cpp.
References activeMasternodeInfo, CGovernanceManager::AddGovernanceObject(), CGovernanceManager::AddPostponedObject(), atoi(), atoi64(), CActiveMasternodeInfo::blsKeyOperator, CActiveMasternodeInfo::blsPubKeyOperator, cs_main, deterministicMNManager, JSONRPCRequest::fHelp, g_connman, UniValue::get_str(), CGovernanceObject::GetDataAsPlainString(), CProposalValidator::GetErrorMessages(), CGovernanceObject::GetHash(), CGovernanceObject::GetObjectType(), BCLog::GOBJECT, gobject_submit_help(), governance, GOVERNANCE_OBJECT_PROPOSAL, GOVERNANCE_OBJECT_TRIGGER, CMasternodeSync::IsBlockchainSynced(), UniValue::isNull(), CGovernanceObject::IsValidLocally(), JSONRPCError(), LOCK, LogPrint, LogPrintf, CGovernanceManager::MasternodeRateCheck(), masternodeSync, CActiveMasternodeInfo::outpoint, JSONRPCRequest::params, ParseHashV(), CGovernanceObject::Relay(), RPC_CLIENT_IN_INITIAL_DOWNLOAD, RPC_INTERNAL_ERROR, RPC_INVALID_PARAMETER, CGovernanceObject::SetMasternodeOutpoint(), CGovernanceObject::Sign(), UniValue::size(), base_blob< BITS >::ToString(), COutPoint::ToStringShort(), and CProposalValidator::Validate().
Referenced by gobject().
◆ gobject_submit_help()
void gobject_submit_help | ( | ) |
Definition at line 233 of file governance.cpp.
Referenced by gobject_submit().
◆ gobject_vote_conf()
UniValue gobject_vote_conf | ( | const JSONRPCRequest & | request | ) |
Definition at line 354 of file governance.cpp.
References activeMasternodeInfo, CActiveMasternodeInfo::blsKeyOperator, CGovernanceVoting::ConvertVoteOutcome(), CGovernanceVoting::ConvertVoteSignal(), CGovernanceManager::cs, deterministicMNManager, JSONRPCRequest::fHelp, CGovernanceManager::FindGovernanceObject(), g_connman, UniValue::get_str(), CGovernanceException::GetMessage(), CGovernanceObject::GetObjectType(), gobject_vote_conf_help(), governance, GOVERNANCE_OBJECT_PROPOSAL, JSONRPCError(), LOCK, CActiveMasternodeInfo::outpoint, Pair(), JSONRPCRequest::params, ParseHashV(), CGovernanceManager::ProcessVoteAndRelay(), UniValue::push_back(), RPC_INVALID_PARAMETER, CGovernanceVote::Sign(), UniValue::size(), strprintf, UniValue::VOBJ, VOTE_OUTCOME_NONE, VOTE_SIGNAL_FUNDING, and VOTE_SIGNAL_NONE.
Referenced by gobject().
◆ gobject_vote_conf_help()
void gobject_vote_conf_help | ( | ) |
Definition at line 342 of file governance.cpp.
Referenced by gobject_vote_conf().
◆ ListObjects()
UniValue ListObjects | ( | const std::string & | strCachedSignal, |
const std::string & | strType, | ||
int | nStartTime | ||
) |
Definition at line 623 of file governance.cpp.
References CGovernanceManager::cs, cs_main, CGovernanceManager::GetAllNewerThan(), GetTime(), governance, GOVERNANCE_OBJECT_PROPOSAL, GOVERNANCE_OBJECT_TRIGGER, LOCK2, Pair(), UniValue::push_back(), COutPoint::ToStringShort(), CGovernanceManager::UpdateLastDiffTime(), UniValue::VOBJ, and VOTE_SIGNAL_FUNDING.
Referenced by gobject_diff(), and gobject_list().
◆ RegisterGovernanceRPCCommands()
void RegisterGovernanceRPCCommands | ( | CRPCTable & | t | ) |
Register governance RPC commands.
Definition at line 1107 of file governance.cpp.
References CRPCTable::appendCommand(), ARRAYLEN, commands, and CRPCCommand::name.
Referenced by RegisterAllCoreRPCCommands().
◆ voteraw()
UniValue voteraw | ( | const JSONRPCRequest & | request | ) |
Definition at line 964 of file governance.cpp.
References CGovernanceVoting::ConvertVoteOutcome(), CGovernanceVoting::ConvertVoteSignal(), CGovernanceManager::cs, DecodeBase64(), deterministicMNManager, JSONRPCRequest::fHelp, CGovernanceManager::FindGovernanceObject(), g_connman, UniValue::get_int(), UniValue::get_int64(), UniValue::get_str(), CGovernanceException::GetMessage(), CGovernanceObject::GetObjectType(), CGovernanceVote::GetSignal(), governance, GOVERNANCE_OBJECT_PROPOSAL, CGovernanceVote::IsValid(), JSONRPCError(), LOCK, JSONRPCRequest::params, ParseHashV(), CGovernanceManager::ProcessVoteAndRelay(), RPC_INTERNAL_ERROR, RPC_INVALID_ADDRESS_OR_KEY, RPC_INVALID_PARAMETER, CGovernanceVote::SetSignature(), CGovernanceVote::SetTime(), UniValue::size(), COutPoint::ToStringShort(), VOTE_OUTCOME_NONE, VOTE_SIGNAL_FUNDING, and VOTE_SIGNAL_NONE.
◆ VoteWithMasternodes()
UniValue VoteWithMasternodes | ( | const std::map< uint256, CKey > & | keys, |
const uint256 & | hash, | ||
vote_signal_enum_t | eVoteSignal, | ||
vote_outcome_enum_t | eVoteOutcome | ||
) |
Definition at line 445 of file governance.cpp.
References CGovernanceManager::cs, deterministicMNManager, CGovernanceManager::FindGovernanceObject(), g_connman, CGovernanceException::GetMessage(), CGovernanceObject::GetObjectType(), governance, JSONRPCError(), LOCK, Pair(), CGovernanceManager::ProcessVoteAndRelay(), UniValue::push_back(), RPC_INVALID_PARAMETER, CGovernanceVote::Sign(), strprintf, and UniValue::VOBJ.
Variable Documentation
◆ commands
|
static |
Definition at line 1096 of file governance.cpp.
Referenced by RegisterGovernanceRPCCommands().