mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
refactor: Spanify some governance APIs
This commit is contained in:
parent
f92e51b4c5
commit
ff69e0d575
@ -925,12 +925,11 @@ void CGovernanceManager::RequestGovernanceObject(CNode* pfrom, const uint256& nH
|
|||||||
|
|
||||||
int CGovernanceManager::RequestGovernanceObjectVotes(CNode& peer, CConnman& connman)
|
int CGovernanceManager::RequestGovernanceObjectVotes(CNode& peer, CConnman& connman)
|
||||||
{
|
{
|
||||||
std::vector<CNode*> vNodesCopy;
|
std::array<CNode*, 1> nodeCopy{&peer};
|
||||||
vNodesCopy.push_back(&peer);
|
return RequestGovernanceObjectVotes(nodeCopy, connman);
|
||||||
return RequestGovernanceObjectVotes(vNodesCopy, connman);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int CGovernanceManager::RequestGovernanceObjectVotes(const std::vector<CNode*>& vNodesCopy, CConnman& connman)
|
int CGovernanceManager::RequestGovernanceObjectVotes(Span<CNode*> vNodesCopy, CConnman& connman)
|
||||||
{
|
{
|
||||||
static std::map<uint256, std::map<CService, int64_t> > mapAskedRecently;
|
static std::map<uint256, std::map<CService, int64_t> > mapAskedRecently;
|
||||||
|
|
||||||
|
@ -347,7 +347,7 @@ public:
|
|||||||
void InitOnLoad();
|
void InitOnLoad();
|
||||||
|
|
||||||
int RequestGovernanceObjectVotes(CNode& peer, CConnman& connman);
|
int RequestGovernanceObjectVotes(CNode& peer, CConnman& connman);
|
||||||
int RequestGovernanceObjectVotes(const std::vector<CNode*>& vNodesCopy, CConnman& connman);
|
int RequestGovernanceObjectVotes(Span<CNode*> vNodesCopy, CConnman& connman);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void RequestGovernanceObject(CNode* pfrom, const uint256& nHash, CConnman& connman, bool fUseFilter = false);
|
void RequestGovernanceObject(CNode* pfrom, const uint256& nHash, CConnman& connman, bool fUseFilter = false);
|
||||||
|
@ -231,7 +231,7 @@ void ProposalModel::remove(int row)
|
|||||||
endRemoveRows();
|
endRemoveRows();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProposalModel::reconcile(const std::vector<const Proposal*>& proposals)
|
void ProposalModel::reconcile(Span<const Proposal*> proposals)
|
||||||
{
|
{
|
||||||
// Vector of m_data.count() false values. Going through new proposals,
|
// Vector of m_data.count() false values. Going through new proposals,
|
||||||
// set keep_index true for each old proposal found in the new proposals.
|
// set keep_index true for each old proposal found in the new proposals.
|
||||||
|
@ -113,7 +113,7 @@ public:
|
|||||||
static int columnWidth(int section);
|
static int columnWidth(int section);
|
||||||
void append(const Proposal* proposal);
|
void append(const Proposal* proposal);
|
||||||
void remove(int row);
|
void remove(int row);
|
||||||
void reconcile(const std::vector<const Proposal*>& proposals);
|
void reconcile(Span<const Proposal*> proposals);
|
||||||
void setVotingParams(int nAbsVoteReq);
|
void setVotingParams(int nAbsVoteReq);
|
||||||
|
|
||||||
const Proposal* getProposalAt(const QModelIndex& index) const;
|
const Proposal* getProposalAt(const QModelIndex& index) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user