Skip to content

Commit 06d7536

Browse files
authored
Merge pull request LIMXTEC#67 from LIMXTEC/dev_3
Dev 3
2 parents 935ddfb + acdf0c9 commit 06d7536

File tree

4 files changed

+26
-4
lines changed

4 files changed

+26
-4
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
33
define(_CLIENT_VERSION_MAJOR, 0)
44
define(_CLIENT_VERSION_MINOR, 90)
55
define(_CLIENT_VERSION_REVISION, 9)
6-
define(_CLIENT_VERSION_BUILD, 5)
6+
define(_CLIENT_VERSION_BUILD, 6)
77
define(_CLIENT_VERSION_IS_RELEASE, true)
88
define(_COPYRIGHT_YEAR, 2020)
99
define(_COPYRIGHT_HOLDERS,[The %s developers])

src/chainparams.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,12 @@ class CMainParams : public CChainParams {
218218
{ 356548, uint256S("0xf62b6c5645997d078d9cb130cfe96d64ec2c047bbceca3ae8ffc373eef80b866")},
219219
{ 550000, uint256S("0xa901848fe9d22814dbb3e0f62892d3bd7a1e70f6a48a459e68ebaf24ea5d5867")},
220220
{ 590000, uint256S("0x81dc076e3b07fbc50a691ddbbe0b53ece5fe95562e54b289c589cd333f7a282a")},
221+
{ 659006, uint256S("0xdb16bdb35d197193c18ab42259b55f0b91c4c84da94e2a49e681c4eb43d96ddb")},
221222
}
222223
};
223224

224225
// BTX for faster loading
225-
consensus.nlastValidPowHashHeight = 590000;
226+
consensus.nlastValidPowHashHeight = 659006;
226227
chainTxData = ChainTxData{
227228
// BTX: data as of block 0x8da1c7f79018fac8acac69a57b2f8b5d2743af67976a4525fdedc8c85a3a1418 (height 410476).
228229
1588381219, // * UNIX timestamp of last known number of transactions

src/consensus/tx_verify.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,33 @@ bool Consensus::CheckTxInputs(const CTransaction& tx, CValidationState& state, c
237237
}
238238
else
239239
{
240+
/*
240241
if (coin.IsCoinBase() && nSpendHeight - coin.nHeight < (!sporkManager.IsSporkActive(SPORK_BTX_16_COINBASE_MATURITY_STAGE_3)? COINBASE_MATURITY_2 : COINBASE_MATURITY_3 ))
241242
{
242243
return state.Invalid(false,
243244
REJECT_INVALID, "bad-txns-premature-spend-of-coinbase",
244245
strprintf("tried to spend coinbase at depth %d", nSpendHeight - coin.nHeight));
245246
}
247+
*/
248+
if (AHeight < 659003)
249+
{
250+
if (coin.IsCoinBase() && nSpendHeight - coin.nHeight < COINBASE_MATURITY_2 )
251+
{
252+
return state.Invalid(false,
253+
REJECT_INVALID, "bad-txns-premature-spend-of-coinbase",
254+
strprintf("tried to spend coinbase at depth %d", nSpendHeight - coin.nHeight));
255+
}
256+
}
257+
else
258+
{
259+
if (coin.IsCoinBase() && nSpendHeight - coin.nHeight < COINBASE_MATURITY_3 )
260+
{
261+
return state.Invalid(false,
262+
REJECT_INVALID, "bad-txns-premature-spend-of-coinbase",
263+
strprintf("tried to spend coinbase at depth %d", nSpendHeight - coin.nHeight));
264+
}
265+
}
266+
246267
}
247268
/*
248269
if (coin.IsCoinBase() && nSpendHeight - coin.nHeight < (!sporkManager.IsSporkActive(SPORK_BTX_16_COINBASE_MATURITY_STAGE_3)? COINBASE_MATURITY_2 : COINBASE_MATURITY_3 )) {

src/wallet/wallet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5612,9 +5612,9 @@ int CMerkleTx::GetBlocksToMaturity() const
56125612
chain_depth = 0;
56135613
// FXTC END
56145614
assert(chain_depth >= 0); // coinbase tx should not be conflicted
5615-
//return std::max(0, (COINBASE_MATURITY+1) - chain_depth);
5615+
return std::max(0, (COINBASE_MATURITY_3 +1) - chain_depth);
56165616
// BTX BEGIN
5617-
return std::max(0, ((!sporkManager.IsSporkActive(SPORK_BTX_15_COINBASE_MATURITY_STAGE_2)? COINBASE_MATURITY : COINBASE_MATURITY_2 )+1) - chain_depth);
5617+
//return std::max(0, ((!sporkManager.IsSporkActive(SPORK_BTX_15_COINBASE_MATURITY_STAGE_2)? COINBASE_MATURITY : //COINBASE_MATURITY_3 )+1) - chain_depth);
56185618
// BTX END
56195619
}
56205620

0 commit comments

Comments
 (0)