Skip to content

Commit d5ba36e

Browse files
committed
v1.0.0.3
*Masternode collateral amount 5000 CROP from block 33333 *Block spacing 60 secs at 15 march switch time
1 parent 8634adf commit d5ba36e

File tree

7 files changed

+26
-10
lines changed

7 files changed

+26
-10
lines changed

cropcoin-qt.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
TEMPLATE = app
22
TARGET = cropcoin-qt
3-
VERSION = 1.0.0.2
3+
VERSION = 1.0.0.3
44
INCLUDEPATH += src src/json src/qt src/qt/plugins/mrichtexteditor
55
QT += network printsupport
66
DEFINES += ENABLE_WALLET

src/clientversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#define CLIENT_VERSION_MAJOR 1
1010
#define CLIENT_VERSION_MINOR 0
1111
#define CLIENT_VERSION_REVISION 0
12-
#define CLIENT_VERSION_BUILD 2
12+
#define CLIENT_VERSION_BUILD 3
1313

1414
// Set to true for release, false for prerelease or test build
1515
#define CLIENT_VERSION_IS_RELEASE true

src/kernel.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,11 @@ bool ComputeNextStakeModifier(const CBlockIndex* pindexPrev, uint64_t& nStakeMod
129129

130130
// Sort candidate blocks by timestamp
131131
vector<pair<int64_t, uint256> > vSortedByTimestamp;
132-
vSortedByTimestamp.reserve(64 * nModifierInterval / TARGET_SPACING);
132+
133+
if (pindexPrev->nTime > FORK_TIME)
134+
vSortedByTimestamp.reserve(64 * nModifierInterval / TARGET_SPACING_NEW);
135+
else
136+
vSortedByTimestamp.reserve(64 * nModifierInterval / TARGET_SPACING);
133137

134138
int64_t nSelectionInterval = GetStakeModifierSelectionInterval();
135139
int64_t nSelectionIntervalStart = (pindexPrev->GetBlockTime() / nModifierInterval) * nModifierInterval - nSelectionInterval;

src/main.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1402,6 +1402,10 @@ unsigned int GetNextTargetRequired(const CBlockIndex* pindexLast, bool fProofOfS
14021402
{
14031403
CBigNum bnTargetLimit = fProofOfStake ? GetProofOfStakeLimit(pindexLast->nHeight) : Params().ProofOfWorkLimit();
14041404

1405+
unsigned int nTargetTemp = TARGET_SPACING;
1406+
if (pindexLast->nTime > FORK_TIME)
1407+
nTargetTemp = TARGET_SPACING_NEW;
1408+
14051409
if (pindexLast == NULL)
14061410
return bnTargetLimit.GetCompact(); // genesis block
14071411

@@ -1415,16 +1419,16 @@ unsigned int GetNextTargetRequired(const CBlockIndex* pindexLast, bool fProofOfS
14151419
int64_t nActualSpacing = pindexPrev->GetBlockTime() - pindexPrevPrev->GetBlockTime();
14161420

14171421
if (nActualSpacing < 0){
1418-
nActualSpacing = TARGET_SPACING;
1422+
nActualSpacing = nTargetTemp;
14191423
}
14201424

14211425
// ppcoin: target change every block
14221426
// ppcoin: retarget with exponential moving toward target spacing
14231427
CBigNum bnNew;
14241428
bnNew.SetCompact(pindexPrev->nBits);
1425-
int64_t nInterval = nTargetTimespan / TARGET_SPACING;
1426-
bnNew *= ((nInterval - 1) * TARGET_SPACING + nActualSpacing + nActualSpacing);
1427-
bnNew /= ((nInterval + 1) * TARGET_SPACING);
1429+
int64_t nInterval = nTargetTimespan / nTargetTemp;
1430+
bnNew *= ((nInterval - 1) * nTargetTemp + nActualSpacing + nActualSpacing);
1431+
bnNew /= ((nInterval + 1) * nTargetTemp);
14281432

14291433
if (bnNew <= 0 || bnNew > bnTargetLimit)
14301434
bnNew = bnTargetLimit;

src/main.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ static const int64_t DARKSEND_POOL_MAX = (999.99*COIN);
2525

2626
static const int64_t STATIC_POS_REWARD = 25 * COIN;
2727
static const int64_t TARGET_SPACING = 120;
28+
static const int64_t TARGET_SPACING_NEW = 60;
29+
static const int64_t FORK_TIME = 1521104400; //March 15th, 2018
2830

2931

3032
#define INSTANTX_SIGNATURES_REQUIRED 10
@@ -73,7 +75,7 @@ inline int64_t FutureDrift(int64_t nTime) { return nTime + DRIFT; }
7375
/** "reject" message codes **/
7476
static const unsigned char REJECT_INVALID = 0x10;
7577

76-
inline int64_t GetMNCollateral(int nHeight) { return nHeight>=20000 ? 2500 : 1000; }
78+
inline int64_t GetMNCollateral(int nHeight) { return nHeight>=33333 ? 5000 : 2500; }
7779

7880
extern CScript COINBASE_FLAGS;
7981
extern CCriticalSection cs_main;

src/qt/bitcoingui.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,10 @@ void BitcoinGUI::updateStakingIcon()
12281228
uint64_t nWeight = this->nWeight;
12291229
uint64_t nNetworkWeight = GetPoSKernelPS();
12301230
unsigned nEstimateTime = 0;
1231-
nEstimateTime = TARGET_SPACING * nNetworkWeight / nWeight;
1231+
if (GetAdjustedTime() > FORK_TIME)
1232+
nEstimateTime = TARGET_SPACING_NEW * nNetworkWeight / nWeight;
1233+
else
1234+
nEstimateTime = TARGET_SPACING * nNetworkWeight / nWeight;
12321235

12331236
QString text;
12341237
if (nEstimateTime < 60)

src/rpcmining.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,10 @@ Value getstakinginfo(const Array& params, bool fHelp)
124124

125125
uint64_t nNetworkWeight = GetPoSKernelPS();
126126
bool staking = nLastCoinStakeSearchInterval && nWeight;
127-
nExpectedTime = staking ? (TARGET_SPACING * nNetworkWeight / nWeight) : 0;
127+
unsigned int nTempSpacing = TARGET_SPACING;
128+
if (GetAdjustedTime() > FORK_TIME)
129+
nTempSpacing = TARGET_SPACING_NEW;
130+
nExpectedTime = staking ? (nTempSpacing * nNetworkWeight / nWeight) : 0;
128131

129132
Object obj;
130133

0 commit comments

Comments
 (0)