diff --git a/src/main.cpp b/src/main.cpp index dedd447bf5..c8fef03bf2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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); diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp index 164c6d885d..ac62152c87 100644 --- a/src/masternode-budget.cpp +++ b/src/masternode-budget.cpp @@ -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; diff --git a/src/masternode-budget.h b/src/masternode-budget.h index 5a64cee5b7..28ea70391d 100644 --- a/src/masternode-budget.h +++ b/src/masternode-budget.h @@ -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 GetVotes(std::string strProposalName); void CleanUp(); diff --git a/src/masternode-payments.h b/src/masternode-payments.h index 93b24d1f13..43fe01cafb 100644 --- a/src/masternode-payments.h +++ b/src/masternode-payments.h @@ -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;