Merge pull request #332 from UdjinM6/v0.12.0.x_fix_mnpayment_bugs

V0.12.0.x fix 2 masternode payments bugs
This commit is contained in:
UdjinM6 2015-05-17 17:26:12 +03:00
commit 5cb819c3f8
2 changed files with 4 additions and 4 deletions

View File

@ -2933,7 +2933,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
CBlockIndex* pindexPrev = chainActive.Tip();
if(pindexPrev != NULL)
{
if(IsBlockPayeeValid(block.vtx[0], pindexPrev->nHeight+1))
if(!IsBlockPayeeValid(block.vtx[0], pindexPrev->nHeight+1))
{
if(Params().NetworkID() != CBaseChainParams::REGTEST)
return state.DoS(100, error("CheckBlock() : Couldn't find masternode payment or payee"));

View File

@ -160,7 +160,7 @@ bool CMasternodeBlockPayees::IsTransactionValid(const CTransaction& txNew)
//require at least 6 signatures
BOOST_FOREACH(CMasternodePayee& payee, vecPayments)
if(payee.nVotes >= nMaxSignatures && MNPAYMENTS_SIGNATURES_REQUIRED)
if(payee.nVotes >= nMaxSignatures && payee.nVotes >= MNPAYMENTS_SIGNATURES_REQUIRED)
nMaxSignatures = payee.nVotes;
// if we don't have at least 6 signatures on a payee, approve whichever is the longest chain