changed enforcement strategy for mn payments
This commit is contained in:
parent
892212d407
commit
dddc095856
@ -290,7 +290,7 @@ bool CMasternodeBlockPayees::IsTransactionValid(const CTransaction& txNew)
|
||||
nMaxSignatures = payee.nVotes;
|
||||
|
||||
// if we don't have at least 6 signatures on a payee, approve whichever is the longest chain
|
||||
if(nMaxSignatures == 0) return true;
|
||||
if(nMaxSignatures < MNPAYMENTS_SIGNATURES_REQUIRED) return true;
|
||||
|
||||
BOOST_FOREACH(CMasternodePayee& payee, vecPayments)
|
||||
{
|
||||
@ -299,11 +299,7 @@ bool CMasternodeBlockPayees::IsTransactionValid(const CTransaction& txNew)
|
||||
if(payee.scriptPubKey == out.scriptPubKey && payee.nValue == out.nValue)
|
||||
found = true;
|
||||
|
||||
//if 2 contenders are within +/- 20%, take either
|
||||
// If nMaxSignatures == 6, the min signatures = 2
|
||||
// If nMaxSignatures == 10, the min signatures = 6
|
||||
// If nMaxSignatures == 15, the min signatures = 11
|
||||
if(payee.nVotes >= nMaxSignatures-(MNPAYMENTS_SIGNATURES_TOTAL/5)){
|
||||
if(payee.nVotes >= MNPAYMENTS_SIGNATURES_REQUIRED){
|
||||
if(found) return true;
|
||||
|
||||
CTxDestination address1;
|
||||
|
@ -23,7 +23,7 @@ extern std::map<uint256, CMasternodeBlockPayees> mapMasternodeBlocks;
|
||||
|
||||
static const int MIN_MNPAYMENTS_PROTO_VERSION = 70066;
|
||||
#define MNPAYMENTS_SIGNATURES_REQUIRED 6
|
||||
#define MNPAYMENTS_SIGNATURES_TOTAL 20
|
||||
#define MNPAYMENTS_SIGNATURES_TOTAL 10
|
||||
|
||||
void ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
|
||||
bool IsReferenceNode(CTxIn& vin);
|
||||
|
Loading…
Reference in New Issue
Block a user