Skip to content

Commit

Permalink
Only pay PoW blocks to masternodes after block 93 000
Browse files Browse the repository at this point in the history
  • Loading branch information
teamswipp committed Nov 12, 2017
1 parent a97b06c commit ae6fc2a
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2413,9 +2413,20 @@ bool CBlock::CheckBlock(CNode* pfrom, bool fCheckPOW, bool fCheckMerkleRoot, boo
LOCK2(cs_main, mempool.cs);

CBlockIndex *pindex = pindexBest;
int vtxIndex = IsProofOfStake() ? 1 : 0;
bool statement;

if (pindexBest->nHeight+1 < 93000)
{
statement = IsProofOfStake() && pindex != NULL;
}
else
{
statement = pindex != NULL;
}

if(statement) {
int vtxIndex = IsProofOfStake() ? 1 : 0;

if(pindex != NULL) {
if(pindex->GetBlockHash() == hashPrevBlock) {
CAmount masternodePaymentAmount = GetMasternodePayment(pindex->nHeight+1, vtx[vtxIndex].GetValueOut());
bool fIsInitialDownload = IsInitialBlockDownload();
Expand Down

0 comments on commit ae6fc2a

Please sign in to comment.