Skip to content

Commit

Permalink
Fix logic in GetMasternodePayment
Browse files Browse the repository at this point in the history
  • Loading branch information
wqking authored and tohsnoom committed Jan 23, 2021
1 parent d02e4e4 commit 33fe425
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/main.cpp
Expand Up @@ -2279,26 +2279,21 @@ CAmount GetMasternodePayment(int nHeight, int64_t blockValue, int nMasternodeCou
{
int64_t ret = 0;

if (Params().NetworkID() == CBaseChainParams::MAIN) {
if (nHeight < 209467) {
ret = blockValue * .25;
}
}
if (Params().NetworkID() == CBaseChainParams::TESTNET) {
if (nHeight < 200)
return 0;
// Start TESTNET seesaw at block 138000
if (nHeight < 137910) {
ret = blockValue * .25;
}
}

if(Params().NetworkID() == CBaseChainParams::MAIN && nHeight < 209467){
ret = blockValue * .25;
}
else if(Params().NetworkID() == CBaseChainParams::TESTNET && nHeight < 137910){
ret = blockValue * .25;
}
// Keep seesaw protocol until removal spork is activated
else if(nHeight < GetSporkValue(SPORK_22_REMOVE_SEESAW_BLOCK)){
blockValue = blockValue * 0.6 ;
ret = GetSeeSaw(nHeight, blockValue);
}
// After seesaw removal, keep masternode payment constant at 2 VITAE
else{
ret = (blockValue * 4 )/ 10;
}
Expand Down

0 comments on commit 33fe425

Please sign in to comment.