Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
governance-classes.cpp
Go to the documentation of this file.
103 LogPrint(BCLog::GOBJECT, "CGovernanceTriggerManager::AddNewTrigger -- Already have hash, nHash = %s, count = %d, size = %s\n",
113 LogPrintf("CGovernanceTriggerManager::AddNewTrigger -- Error creating superblock: %s\n", e.what());
138 LogPrint(BCLog::GOBJECT, "CGovernanceTriggerManager::CleanAndRemove -- mapTrigger.size() = %d\n", mapTrigger.size());
151 LogPrint(BCLog::GOBJECT, "CGovernanceTriggerManager::CleanAndRemove -- Unknown or non-trigger superblock\n");
155 LogPrint(BCLog::GOBJECT, "CGovernanceTriggerManager::CleanAndRemove -- superblock status = %d\n", pSuperblock->GetStatus());
159 LogPrint(BCLog::GOBJECT, "CGovernanceTriggerManager::CleanAndRemove -- Unknown or invalid trigger found\n");
176 LogPrint(BCLog::GOBJECT, "CGovernanceTriggerManager::CleanAndRemove -- %smarked for removal\n", remove ? "" : "NOT ");
185 LogPrint(BCLog::GOBJECT, "CGovernanceTriggerManager::CleanAndRemove -- Removing trigger object %s\n", strDataAsPlainString);
225 LogPrint(BCLog::GOBJECT, "CSuperblockManager::IsSuperblockTriggered -- Start nBlockHeight = %d\n", nBlockHeight);
234 LogPrint(BCLog::GOBJECT, "CSuperblockManager::IsSuperblockTriggered -- vecTriggers.size() = %d\n", vecTriggers.size());
249 LogPrint(BCLog::GOBJECT, "CSuperblockManager::IsSuperblockTriggered -- data = %s\n", pObj->GetDataAsPlainString());
254 LogPrint(BCLog::GOBJECT, "CSuperblockManager::IsSuperblockTriggered -- block height doesn't match nBlockHeight = %d, blockStart = %d, continuing\n",
265 LogPrint(BCLog::GOBJECT, "CSuperblockManager::IsSuperblockTriggered -- fCacheFunding = true, returning true\n");
268 LogPrint(BCLog::GOBJECT, "CSuperblockManager::IsSuperblockTriggered -- fCacheFunding = false, continuing\n");
315 bool CSuperblockManager::GetSuperblockPayments(int nBlockHeight, std::vector<CTxOut>& voutSuperblockRet)
323 LogPrint(BCLog::GOBJECT, "CSuperblockManager::GetSuperblockPayments -- Can't find superblock for height %d\n", nBlockHeight);
353 LogPrint(BCLog::GOBJECT, "CSuperblockManager::GetSuperblockPayments -- NEW Superblock: output %d (addr %s, amount %lld)\n",
363 bool CSuperblockManager::IsValid(const CTransaction& txNew, int nBlockHeight, CAmount blockReward)
427 LogPrint(BCLog::GOBJECT, "CSuperblock -- nBlockHeight = %d, strAddresses = %s, strAmounts = %s, vecPayments.size() = %d\n",
444 void CSuperblock::GetNearestSuperblocksHeights(int nBlockHeight, int& nLastSuperblockRet, int& nNextSuperblockRet)
451 int nFirstSuperblockOffset = (nSuperblockCycle - nSuperblockStartBlock % nSuperblockCycle) % nSuperblockCycle;
472 int nBits = consensusParams.fPowAllowMinDifficultyBlocks ? UintToArith256(consensusParams.powLimit).GetCompact() : 1;
474 CAmount nSuperblockPartOfSubsidy = GetBlockSubsidy(nBits, nBlockHeight - 1, consensusParams, true);
476 LogPrint(BCLog::GOBJECT, "CSuperblock::GetPaymentsLimit -- Valid superblock height %d, payments max %lld\n", nBlockHeight, nPaymentsLimit);
481 void CSuperblock::ParsePaymentSchedule(const std::string& strPaymentAddresses, const std::string& strPaymentAmounts)
523 - There might be an issue with multisig in the coinbase on mainnet, we will add support for it in a future release.
529 ostr << "CSuperblock::ParsePaymentSchedule -- Script addresses are not supported yet : " << vecParsed1[i];
536 LogPrint(BCLog::GOBJECT, "CSuperblock::ParsePaymentSchedule -- i = %d, amount string = %s, nAmount = %lld\n", i, vecParsed2[i], nAmount);
544 ostr << "CSuperblock::ParsePaymentSchedule -- Invalid payment found: address = " << EncodeDestination(dest)
600 LogPrint(BCLog::GOBJECT, "CSuperblock::IsValid -- nOutputs = %d, nPayments = %d, GetDataAsHexString = %s\n",
618 LogPrintf("CSuperblock::IsValid -- ERROR: Block invalid, payments limit exceeded: payments %lld, limit %lld\n", nPaymentsTotalAmount, nPaymentsLimit);
625 LogPrintf("CSuperblock::IsValid -- ERROR: Block invalid, block value limit exceeded: block %lld, limit %lld\n", nBlockValue, blockReward + nPaymentsTotalAmount);
634 LogPrintf("CSuperblock::IsValid -- WARNING: Failed to find payment: %d of %d total payments\n", i, nPayments);
656 LogPrintf("CSuperblock::IsValid -- ERROR: Block invalid: %d payment %d to %s not found\n", i, payment.nAmount, EncodeDestination(dest));
684 LogPrint(BCLog::GOBJECT, "CSuperblock::IsExpired -- nBlockHeight = %d, nExpirationBlock = %d\n", nBlockHeight, nExpirationBlock);
709 LogPrint(BCLog::GOBJECT, "CSuperblockManager::GetRequiredPaymentsString -- Can't find superblock for height %d\n", nBlockHeight);
std::vector< CSuperblock_sptr > GetActiveTriggers()
Get Active Triggers.
Definition: governance-classes.cpp:201
boost::variant< CNoDestination, CKeyID, CScriptID > CTxDestination
A txout script template with a specific destination.
Definition: standard.h:80
bool ExtractDestination(const CScript &scriptPubKey, CTxDestination &addressRet)
Parse a standard scriptPubKey for the destination address.
Definition: standard.cpp:158
CAmount ParsePaymentAmount(const std::string &strAmount)
Definition: governance-classes.cpp:35
Definition: governance-vote.h:27
static void GetNearestSuperblocksHeights(int nBlockHeight, int &nLastSuperblockRet, int &nNextSuperblockRet)
Definition: governance-classes.cpp:444
static bool IsSuperblockTriggered(int nBlockHeight)
Is Superblock Triggered.
Definition: governance-classes.cpp:223
bool IsValidDestination(const CTxDestination &dest)
Check whether a CTxDestination is a CNoDestination.
Definition: standard.cpp:281
CGovernanceObject * GetGovernanceObject()
Definition: governance-classes.h:156
bool fPowAllowMinDifficultyBlocks
Definition: params.h:174
Definition: univalue.h:20
std::vector< std::string > SplitBy(const std::string &strCommand, const std::string &strDelimit)
Definition: governance-classes.cpp:20
static bool IsValid(const CTransaction &txNew, int nBlockHeight, CAmount blockReward)
Definition: governance-classes.cpp:363
void PrepareDeletion(int64_t nDeletionTime_)
Definition: governance-object.h:275
bool IsSetCachedFunding() const
Definition: governance-object.h:214
static const int SEEN_OBJECT_ERROR_INVALID
Definition: governance-object.h:46
trigger_m_t::iterator trigger_m_it
Definition: governance-classes.h:36
uint32_t GetCompact(bool fNegative=false) const
Definition: arith_uint256.cpp:226
CGovernanceObject * FindGovernanceObject(const uint256 &nHash)
Definition: governance.cpp:463
UniValue GetJSONObject()
Return the actual object from the vchData JSON structure.
Definition: governance-object.cpp:332
int GetCachedBlockHeight() const
Definition: governance.h:356
bool ParseFixedPoint(const std::string &val, int decimals, int64_t *amount_out)
Parse number as fixed point according to JSON number syntax.
Definition: utilstrencodings.cpp:644
static bool IsValidBlockHeight(int nBlockHeight)
Is Valid Superblock Height.
Definition: governance-classes.cpp:437
Definition: util.h:134
static std::string GetRequiredPaymentsString(int nBlockHeight)
Get Required Payment String.
Definition: governance-classes.cpp:700
static const int GOVERNANCE_OBJECT_TRIGGER
Definition: governance-object.h:34
static bool GetSuperblockPayments(int nBlockHeight, std::vector< CTxOut > &voutSuperblockRet)
Get Superblock Payments.
Definition: governance-classes.cpp:315
std::string GetDataAsPlainString() const
Definition: governance-object.cpp:417
static CAmount GetPaymentsLimit(int nBlockHeight)
Definition: governance-classes.cpp:463
void UpdateSentinelVariables()
Definition: governance-object.cpp:662
std::string EncodeDestination(const CTxDestination &dest)
Definition: base58.cpp:329
const CChainParams & Params()
Return the currently selected parameters.
Definition: chainparams.cpp:947
int GetAbsoluteYesCount(vote_signal_enum_t eVoteSignalIn) const
Get specific vote counts for each outcome (funding, validity, etc)
Definition: governance-object.cpp:613
static bool GetBestSuperblock(CSuperblock_sptr &pSuperblockRet, int nBlockHeight)
Definition: governance-classes.cpp:276
CAmount GetPaymentsTotalAmount()
Definition: governance-classes.cpp:562
A reference to a CScript: the Hash160 of its serialization (see script.h)
Definition: standard.h:22
The basic transaction that is broadcasted on the network and contained in blocks. ...
Definition: transaction.h:198
const Consensus::Params & GetConsensus() const
Definition: chainparams.h:54
void ParsePaymentSchedule(const std::string &strPaymentAddresses, const std::string &strPaymentAmounts)
Definition: governance-classes.cpp:481
CAmount GetBlockSubsidy(int nPrevBits, int nPrevHeight, const Consensus::Params &consensusParams, bool fSuperblockPartOnly)
Definition: validation.cpp:1108
AssertLockHeld(g_cs_orphans)
static void ExecuteBestSuperblock(int nBlockHeight)
Definition: governance-classes.cpp:376
std::vector< CGovernancePayment > vecPayments
Definition: governance-classes.h:138
bool IsValid(const CTransaction &txNew, int nBlockHeight, CAmount blockReward)
Is Transaction Valid.
Definition: governance-classes.cpp:580
bool GetPayment(int nPaymentIndex, CGovernancePayment &paymentRet)
Definition: governance-classes.cpp:552