mirror of
https://github.com/dashpay/dash.git
synced 2024-12-28 13:32:47 +01:00
draft
This commit is contained in:
parent
160eec6e30
commit
c6233880c3
@ -3242,7 +3242,7 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
|
|||||||
darkSendPool.NewBlock();
|
darkSendPool.NewBlock();
|
||||||
masternodePayments.ProcessBlock(GetHeight()+10);
|
masternodePayments.ProcessBlock(GetHeight()+10);
|
||||||
mnscan.DoMasternodePOSChecks();
|
mnscan.DoMasternodePOSChecks();
|
||||||
//budget.NewBlock();
|
budget.NewBlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4990,8 +4990,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
|
|||||||
darkSendPool.ProcessMessageDarksend(pfrom, strCommand, vRecv);
|
darkSendPool.ProcessMessageDarksend(pfrom, strCommand, vRecv);
|
||||||
mnodeman.ProcessMessage(pfrom, strCommand, vRecv);
|
mnodeman.ProcessMessage(pfrom, strCommand, vRecv);
|
||||||
budget.ProcessMessage(pfrom, strCommand, vRecv);
|
budget.ProcessMessage(pfrom, strCommand, vRecv);
|
||||||
//TODO
|
masternodePayments.ProcessMessageMasternodePayments(pfrom, strCommand, vRecv);
|
||||||
//ProcessMessageMasternodePayments(pfrom, strCommand, vRecv);
|
|
||||||
ProcessMessageInstantX(pfrom, strCommand, vRecv);
|
ProcessMessageInstantX(pfrom, strCommand, vRecv);
|
||||||
ProcessSpork(pfrom, strCommand, vRecv);
|
ProcessSpork(pfrom, strCommand, vRecv);
|
||||||
ProcessMessageMasternodePOS(pfrom, strCommand, vRecv);
|
ProcessMessageMasternodePOS(pfrom, strCommand, vRecv);
|
||||||
|
@ -341,7 +341,7 @@ void CBudgetManager::AddOrUpdateProposal(CBudgetVote& vote)
|
|||||||
|
|
||||||
if(!mapProposals.count(hash)){
|
if(!mapProposals.count(hash)){
|
||||||
CBudgetProposal prop(vote.strProposalName);
|
CBudgetProposal prop(vote.strProposalName);
|
||||||
//mapProposals.insert(make_pair(hash, prop));
|
mapProposals.insert(make_pair(hash, prop));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -353,16 +353,10 @@ void CBudgetProposal::AddOrUpdateVote(CBudgetVote& vote)
|
|||||||
LOCK(cs);
|
LOCK(cs);
|
||||||
|
|
||||||
uint256 hash = vote.vin.prevout.GetHash();
|
uint256 hash = vote.vin.prevout.GetHash();
|
||||||
|
|
||||||
if(!mapVotes.count(hash)){
|
|
||||||
mapVotes.insert(make_pair(hash, vote));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
mapVotes[hash] = vote;
|
mapVotes[hash] = vote;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void CBudgetManager::NewBlock()
|
void CBudgetManager::NewBlock()
|
||||||
{
|
{
|
||||||
//this function should be called 1/6 blocks, allowing up to 100 votes per day on all proposals
|
//this function should be called 1/6 blocks, allowing up to 100 votes per day on all proposals
|
||||||
if(chainActive.Height() % 6 != 0) return;
|
if(chainActive.Height() % 6 != 0) return;
|
||||||
|
@ -79,7 +79,7 @@ public:
|
|||||||
void Calculate();
|
void Calculate();
|
||||||
void ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
|
void ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
|
||||||
CBudgetProposal *Find(const std::string &strProposalName);
|
CBudgetProposal *Find(const std::string &strProposalName);
|
||||||
inline void NewBlock();
|
void NewBlock();
|
||||||
std::pair<std::string, std::string> GetVotes(std::string strProposalName);
|
std::pair<std::string, std::string> GetVotes(std::string strProposalName);
|
||||||
|
|
||||||
void CleanUp();
|
void CleanUp();
|
||||||
|
@ -6,15 +6,9 @@
|
|||||||
#ifndef MASTERNODE_PAYMENTS_H
|
#ifndef MASTERNODE_PAYMENTS_H
|
||||||
#define MASTERNODE_PAYMENTS_H
|
#define MASTERNODE_PAYMENTS_H
|
||||||
|
|
||||||
//#include "sync.h"
|
|
||||||
//#include "net.h"
|
|
||||||
#include "key.h"
|
#include "key.h"
|
||||||
//#include "util.h"
|
|
||||||
//#include "base58.h"
|
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "masternode.h"
|
#include "masternode.h"
|
||||||
//#include "masternode-pos.h"
|
|
||||||
//#include "timedata.h"
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user