mirror of
https://github.com/dashpay/dash.git
synced 2024-12-28 13:32:47 +01:00
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:
commit
5cb819c3f8
@ -2933,7 +2933,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
|
|||||||
CBlockIndex* pindexPrev = chainActive.Tip();
|
CBlockIndex* pindexPrev = chainActive.Tip();
|
||||||
if(pindexPrev != NULL)
|
if(pindexPrev != NULL)
|
||||||
{
|
{
|
||||||
if(IsBlockPayeeValid(block.vtx[0], pindexPrev->nHeight+1))
|
if(!IsBlockPayeeValid(block.vtx[0], pindexPrev->nHeight+1))
|
||||||
{
|
{
|
||||||
if(Params().NetworkID() != CBaseChainParams::REGTEST)
|
if(Params().NetworkID() != CBaseChainParams::REGTEST)
|
||||||
return state.DoS(100, error("CheckBlock() : Couldn't find masternode payment or payee"));
|
return state.DoS(100, error("CheckBlock() : Couldn't find masternode payment or payee"));
|
||||||
|
@ -160,7 +160,7 @@ bool CMasternodeBlockPayees::IsTransactionValid(const CTransaction& txNew)
|
|||||||
//require at least 6 signatures
|
//require at least 6 signatures
|
||||||
|
|
||||||
BOOST_FOREACH(CMasternodePayee& payee, vecPayments)
|
BOOST_FOREACH(CMasternodePayee& payee, vecPayments)
|
||||||
if(payee.nVotes >= nMaxSignatures && MNPAYMENTS_SIGNATURES_REQUIRED)
|
if(payee.nVotes >= nMaxSignatures && payee.nVotes >= MNPAYMENTS_SIGNATURES_REQUIRED)
|
||||||
nMaxSignatures = payee.nVotes;
|
nMaxSignatures = payee.nVotes;
|
||||||
|
|
||||||
// if we don't have at least 6 signatures on a payee, approve whichever is the longest chain
|
// if we don't have at least 6 signatures on a payee, approve whichever is the longest chain
|
||||||
|
Loading…
Reference in New Issue
Block a user