Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
•All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
simplifiedmns.cpp
Go to the documentation of this file.
39 return strprintf("CSimplifiedMNListEntry(proRegTxHash=%s, confirmedHash=%s, service=%s, pubKeyOperator=%s, votingAddress=%s, isValid=%d)",
40 proRegTxHash.ToString(), confirmedHash.ToString(), service.ToString(false), pubKeyOperator.Get().ToString(), EncodeDestination(keyIDVoting), isValid);
62 std::sort(mnList.begin(), mnList.end(), [&](const std::unique_ptr<CSimplifiedMNListEntry>& a, const std::unique_ptr<CSimplifiedMNListEntry>& b) {
76 std::sort(mnList.begin(), mnList.end(), [&](const std::unique_ptr<CSimplifiedMNListEntry>& a, const std::unique_ptr<CSimplifiedMNListEntry>& b) {
99 bool CSimplifiedMNListDiff::BuildQuorumsDiff(const CBlockIndex* baseBlockIndex, const CBlockIndex* blockIndex)
101 auto baseQuorums = llmq::quorumBlockProcessor->GetMinedAndActiveCommitmentsUntilBlock(baseBlockIndex);
144 obj.push_back(Pair("cbTxMerkleTree", HexStr(ssCbTxMerkleTree.begin(), ssCbTxMerkleTree.end())));
188 bool BuildSimplifiedMNListDiff(const uint256& baseBlockHash, const uint256& blockHash, CSimplifiedMNListDiff& mnListDiffRet, std::string& errorRet)
210 errorRet = strprintf("block %s and %s are not in the same chain", baseBlockHash.ToString(), blockHash.ToString());
214 errorRet = strprintf("base block %s is higher then block %s", baseBlockHash.ToString(), blockHash.ToString());
224 // We need to return the value that was provided by the other peer as it otherwise won't be able to recognize the
225 // response. This will usually be identical to the block found in baseBlockIndex. The only difference is when a
bool GetTxPayload(const std::vector< unsigned char > &payload, T &obj)
Definition: specialtx.h:21
std::vector< llmq::CFinalCommitment > newQuorums
Definition: simplifiedmns.h:118
Definition: quorums_commitment.h:24
std::string ToString(bool fUseGetnameinfo=true) const
Definition: netaddress.cpp:581
Definition: simplifiedmns.h:106
bool BuildSimplifiedMNListDiff(const uint256 &baseBlockHash, const uint256 &blockHash, CSimplifiedMNListDiff &mnListDiffRet, std::string &errorRet)
Definition: simplifiedmns.cpp:188
Definition: block.h:72
CQuorumBlockProcessor * quorumBlockProcessor
Definition: quorums_blockprocessor.cpp:23
std::string HexStr(const T itbegin, const T itend, bool fSpaces=false)
Definition: utilstrencodings.h:100
Definition: univalue.h:20
CBlockIndex * Genesis() const
Returns the index entry for the genesis block of this chain, or nullptr if none.
Definition: chain.h:448
Double ended buffer combining vector and stream-like interfaces.
Definition: streams.h:103
std::shared_ptr< const CDeterministicMN > CDeterministicMNCPtr
Definition: deterministicmns.h:249
Definition: univalue.h:22
Data structure that represents a partial merkle tree.
Definition: merkleblock.h:50
void ForEachMN(bool onlyValid, Callback &&cb) const
Definition: deterministicmns.h:366
std::unique_ptr< CDeterministicMNManager > deterministicMNManager
Definition: deterministicmns.cpp:24
bool BuildQuorumsDiff(const CBlockIndex *baseBlockIndex, const CBlockIndex *blockIndex)
Definition: simplifiedmns.cpp:99
Definition: univalue.h:22
~CSimplifiedMNListDiff()
Definition: simplifiedmns.cpp:95
Definition: deterministicmns.h:288
std::map< Consensus::LLMQType, std::vector< const CBlockIndex * > > GetMinedAndActiveCommitmentsUntilBlock(const CBlockIndex *pindex)
Definition: quorums_blockprocessor.cpp:465
bool Contains(const CBlockIndex *pindex) const
Efficiently check whether a block is present in this chain.
Definition: chain.h:471
Definition: deterministicmns.h:189
CBLSLazyPublicKey pubKeyOperator
Definition: simplifiedmns.h:30
static std::pair< std::string, UniValue > Pair(const char *cKey, const char *cVal)
Definition: univalue.h:185
uint256 ComputeMerkleRoot(std::vector< uint256 > hashes, bool *mutated)
Definition: merkle.cpp:46
std::string EncodeDestination(const CTxDestination &dest)
Definition: base58.cpp:329
The block chain is a tree shaped structure starting with the genesis block at the root...
Definition: chain.h:170
const CChainParams & Params()
Return the currently selected parameters.
Definition: chainparams.cpp:947
CPartialMerkleTree cbTxMerkleTree
Definition: simplifiedmns.h:111
uint256 CalcMerkleRoot(bool *pmutated=nullptr) const
Definition: simplifiedmns.cpp:81
std::vector< std::unique_ptr< CSimplifiedMNListEntry > > mnList
Definition: simplifiedmns.h:77
bool ReadBlockFromDisk(CBlock &block, const CDiskBlockPos &pos, const Consensus::Params &consensusParams)
Functions for disk access for blocks.
Definition: validation.cpp:1043
CChain & chainActive
The currently-connected chain of blocks (protected by cs_main).
Definition: validation.cpp:217
AssertLockHeld(g_cs_orphans)
static const int CLIENT_VERSION
dashd-res.rc includes this file, but it cannot cope with real c++ code.
Definition: clientversion.h:38
Definition: serialize.h:160
std::vector< CSimplifiedMNListEntry > mnList
Definition: simplifiedmns.h:114
Definition: serialize.h:162
std::vector< std::pair< uint8_t, uint256 > > deletedQuorums
Definition: simplifiedmns.h:117
CSimplifiedMNListEntry()
Definition: simplifiedmns.h:35