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)
|
||||
{
|
||||
std::vector<CNode*> vNodesCopy;
|
||||
vNodesCopy.push_back(&peer);
|
||||
return RequestGovernanceObjectVotes(vNodesCopy, connman);
|
||||
std::array<CNode*, 1> nodeCopy{&peer};
|
||||
return RequestGovernanceObjectVotes(nodeCopy, 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;
|
||||
|
||||
|
@ -347,7 +347,7 @@ public:
|
||||
void InitOnLoad();
|
||||
|
||||
int RequestGovernanceObjectVotes(CNode& peer, CConnman& connman);
|
||||
int RequestGovernanceObjectVotes(const std::vector<CNode*>& vNodesCopy, CConnman& connman);
|
||||
int RequestGovernanceObjectVotes(Span<CNode*> vNodesCopy, CConnman& connman);
|
||||
|
||||
private:
|
||||
void RequestGovernanceObject(CNode* pfrom, const uint256& nHash, CConnman& connman, bool fUseFilter = false);
|
||||
|
@ -231,7 +231,7 @@ void ProposalModel::remove(int row)
|
||||
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,
|
||||
// set keep_index true for each old proposal found in the new proposals.
|
||||
|
@ -113,7 +113,7 @@ public:
|
||||
static int columnWidth(int section);
|
||||
void append(const Proposal* proposal);
|
||||
void remove(int row);
|
||||
void reconcile(const std::vector<const Proposal*>& proposals);
|
||||
void reconcile(Span<const Proposal*> proposals);
|
||||
void setVotingParams(int nAbsVoteReq);
|
||||
|
||||
const Proposal* getProposalAt(const QModelIndex& index) const;
|
||||
|
Loading…
Reference in New Issue
Block a user