From 25894972c13180df13de2bf5e35704418cafd59e Mon Sep 17 00:00:00 2001 From: Evan Duffield Date: Wed, 2 Sep 2015 05:13:32 -0700 Subject: [PATCH] reduce memory usage --- src/masternode-payments.cpp | 2 +- src/masternode-sync.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp index 8dbdafc19..080e9b371 100644 --- a/src/masternode-payments.cpp +++ b/src/masternode-payments.cpp @@ -598,7 +598,7 @@ void CMasternodePayments::CleanPaymentList() if(chainActive.Tip() == NULL) return; //keep up to five cycles for historical sake - int nLimit = std::max(((int)mnodeman.size())*2, 1000); + int nLimit = std::max(((int)mnodeman.size())*1.25, 1000); std::map::iterator it = mapMasternodePayeeVotes.begin(); while(it != mapMasternodePayeeVotes.end()) { diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp index d894e1d23..0a950398f 100644 --- a/src/masternode-sync.cpp +++ b/src/masternode-sync.cpp @@ -265,7 +265,7 @@ void CMasternodeSync::Process() } else if(RequestedMasternodeAttempt < 4) { mnodeman.DsegUpdate(pnode); } else if(RequestedMasternodeAttempt < 6) { - int nMnCount = mnodeman.CountEnabled()*2; + int nMnCount = mnodeman.CountEnabled(); pnode->PushMessage("mnget", nMnCount); //sync payees uint256 n = 0; pnode->PushMessage("mnvs", n); //sync masternode votes @@ -351,7 +351,7 @@ void CMasternodeSync::Process() CBlockIndex* pindexPrev = chainActive.Tip(); if(pindexPrev == NULL) return; - int nMnCount = mnodeman.CountEnabled()*2; + int nMnCount = mnodeman.CountEnabled(); pnode->PushMessage("mnget", nMnCount); //sync payees RequestedMasternodeAttempt++;