PIVX Core  5.6.99
P2P Digital Currency
quorums_connections.h
Go to the documentation of this file.
1 // Copyright (c) 2018-2019 The Dash Core developers
2 // Copyright (c) 2022 The PIVX Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef PIVX_LLMQ_QUORUMS_CONNECTIONS_H
7 #define PIVX_LLMQ_QUORUMS_CONNECTIONS_H
8 
9 #include "consensus/params.h"
10 #include "quorums.h"
11 
12 class CBlockIndex;
13 class CDeterministicMN;
14 typedef std::shared_ptr<const CDeterministicMN> CDeterministicMNCPtr;
15 
16 namespace llmq {
17 
18 // Deterministically selects which node should initiate the mnauth process
19 uint256 DeterministicOutboundConnection(const uint256& proTxHash1, const uint256& proTxHash2);
20 
21 // Return the outbound quorum relay members for 'forMember' (proTxHash)
22 std::set<uint256> GetQuorumRelayMembers(const std::vector<CDeterministicMNCPtr>& mnList, unsigned int forMemberIndex);
23 std::set<size_t> CalcDeterministicWatchConnections(Consensus::LLMQType llmqType, const CBlockIndex* pindexQuorum, size_t memberCount, size_t connectionCount);
24 
25 void EnsureQuorumConnections(Consensus::LLMQType llmqType, const CBlockIndex* pindexQuorum, const uint256& myProTxHash);
26 void EnsureLatestQuorumConnections(Consensus::LLMQType llmqType, const CBlockIndex* pindexNew, const uint256& myProTxHash, std::vector<CQuorumCPtr>& lastQuorums);
27 
28 void AddQuorumProbeConnections(Consensus::LLMQType llmqType, const CBlockIndex* pindexQuorum, const uint256& myProTxHash);
29 
30 } // namespace llmq
31 
32 #endif // PIVX_LLMQ_QUORUMS_CONNECTIONS_H
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition: chain.h:139
256-bit opaque blob.
Definition: uint256.h:138
LLMQType
Definition: params.h:90
Definition: quorums.cpp:26
uint256 DeterministicOutboundConnection(const uint256 &proTxHash1, const uint256 &proTxHash2)
void EnsureLatestQuorumConnections(Consensus::LLMQType llmqType, const CBlockIndex *pindexNew, const uint256 &myProTxHash, std::vector< CQuorumCPtr > &lastQuorums)
void EnsureQuorumConnections(Consensus::LLMQType llmqType, const CBlockIndex *pindexQuorum, const uint256 &myProTxHash)
void AddQuorumProbeConnections(Consensus::LLMQType llmqType, const CBlockIndex *pindexQuorum, const uint256 &myProTxHash)
std::set< size_t > CalcDeterministicWatchConnections(Consensus::LLMQType llmqType, const CBlockIndex *pindexQuorum, size_t memberCount, size_t connectionCount)
std::set< uint256 > GetQuorumRelayMembers(const std::vector< CDeterministicMNCPtr > &mnList, unsigned int forMemberIndex)
std::shared_ptr< const CDeterministicMN > CDeterministicMNCPtr