Skip to content
Permalink
Browse files

Refactor code related to masternode collateral change

  • Loading branch information...
nlevo committed Jan 11, 2019
1 parent 053b19b commit c39e6acfaecc52eb6e8ec1350a67f9f8490bce82
Showing with 19 additions and 9 deletions.
  1. +13 −9 src/chainparams.cpp
  2. +6 −0 src/chainparams.h
@@ -175,6 +175,11 @@ class CMainParams : public CChainParams {
nZtransparentStartBlock = 9893 + nForkStartHeight;
nZshieldedStartBlock = 10132 + nForkStartHeight;

// masternode related
masternodeCollateralChangeBlock = 37000;
masternodeCollateralOld = 500;
masternodeCollateralNew = 10000;

eh_epoch_1 = eh200_9;
eh_epoch_2 = eh144_5;
eh_epoch_1_endblock = nForkStartHeight + nForkHeightRange;
@@ -293,6 +298,11 @@ class CTestNetParams : public CMainParams {
nZtransparentStartBlock = 5;
nZshieldedStartBlock = 6;

//masternode collateral
masternodeCollateralChangeBlock = 1;
masternodeCollateralOld = 500;
masternodeCollateralNew = 10000;

// Founders reward
vFoundersRewardAddress = {
"tAJzf6XuVdCpNbsaeqppYPm2GfJgKSLKt9B", /* test-index: 0*/
@@ -456,14 +466,8 @@ CScript CChainParams::GetFoundersRewardScriptAtHeight(int nHeight) const {
}

int CChainParams::GetMasternodeCollateral(int nHeight) const {

int masternodeCollateral;

if(nHeight >= 37000) {
masternodeCollateral = 10000;
} else {
masternodeCollateral = 500;
}

return masternodeCollateral;
if(nHeight >= masternodeCollateralChangeBlock)
return masternodeCollateralNew;
return masternodeCollateralOld;
}
@@ -152,6 +152,12 @@ class CChainParams
uint64_t nForkHeightRange;
uint64_t nZshieldedStartBlock;
uint64_t nZtransparentStartBlock;

//Masternode related
int masternodeCollateralChangeBlock;
int masternodeCollateralOld;
int masternodeCollateralNew;

};

/**

0 comments on commit c39e6ac

Please sign in to comment.
You can’t perform that action at this time.