This commit is contained in:
Evan Duffield 2015-05-04 03:05:08 -07:00
parent 160eec6e30
commit c6233880c3
4 changed files with 5 additions and 18 deletions

View File

@ -3242,7 +3242,7 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
darkSendPool.NewBlock();
masternodePayments.ProcessBlock(GetHeight()+10);
mnscan.DoMasternodePOSChecks();
//budget.NewBlock();
budget.NewBlock();
}
}
@ -4990,8 +4990,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
darkSendPool.ProcessMessageDarksend(pfrom, strCommand, vRecv);
mnodeman.ProcessMessage(pfrom, strCommand, vRecv);
budget.ProcessMessage(pfrom, strCommand, vRecv);
//TODO
//ProcessMessageMasternodePayments(pfrom, strCommand, vRecv);
masternodePayments.ProcessMessageMasternodePayments(pfrom, strCommand, vRecv);
ProcessMessageInstantX(pfrom, strCommand, vRecv);
ProcessSpork(pfrom, strCommand, vRecv);
ProcessMessageMasternodePOS(pfrom, strCommand, vRecv);

View File

@ -341,7 +341,7 @@ void CBudgetManager::AddOrUpdateProposal(CBudgetVote& vote)
if(!mapProposals.count(hash)){
CBudgetProposal prop(vote.strProposalName);
//mapProposals.insert(make_pair(hash, prop));
mapProposals.insert(make_pair(hash, prop));
return;
}
@ -353,16 +353,10 @@ void CBudgetProposal::AddOrUpdateVote(CBudgetVote& vote)
LOCK(cs);
uint256 hash = vote.vin.prevout.GetHash();
if(!mapVotes.count(hash)){
mapVotes.insert(make_pair(hash, vote));
return;
}
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
if(chainActive.Height() % 6 != 0) return;

View File

@ -79,7 +79,7 @@ public:
void Calculate();
void ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
CBudgetProposal *Find(const std::string &strProposalName);
inline void NewBlock();
void NewBlock();
std::pair<std::string, std::string> GetVotes(std::string strProposalName);
void CleanUp();

View File

@ -6,15 +6,9 @@
#ifndef MASTERNODE_PAYMENTS_H
#define MASTERNODE_PAYMENTS_H
//#include "sync.h"
//#include "net.h"
#include "key.h"
//#include "util.h"
//#include "base58.h"
#include "main.h"
#include "masternode.h"
//#include "masternode-pos.h"
//#include "timedata.h"
using namespace std;