Skip to content

Commit

Permalink
Merge pull request LIMXTEC#67 from LIMXTEC/dev_3
Browse files Browse the repository at this point in the history
Dev 3
  • Loading branch information
limxdev authored Sep 1, 2020
2 parents 935ddfb + acdf0c9 commit 06d7536
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 0)
define(_CLIENT_VERSION_MINOR, 90)
define(_CLIENT_VERSION_REVISION, 9)
define(_CLIENT_VERSION_BUILD, 5)
define(_CLIENT_VERSION_BUILD, 6)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2020)
define(_COPYRIGHT_HOLDERS,[The %s developers])
Expand Down
3 changes: 2 additions & 1 deletion src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,12 @@ class CMainParams : public CChainParams {
{ 356548, uint256S("0xf62b6c5645997d078d9cb130cfe96d64ec2c047bbceca3ae8ffc373eef80b866")},
{ 550000, uint256S("0xa901848fe9d22814dbb3e0f62892d3bd7a1e70f6a48a459e68ebaf24ea5d5867")},
{ 590000, uint256S("0x81dc076e3b07fbc50a691ddbbe0b53ece5fe95562e54b289c589cd333f7a282a")},
{ 659006, uint256S("0xdb16bdb35d197193c18ab42259b55f0b91c4c84da94e2a49e681c4eb43d96ddb")},
}
};

// BTX for faster loading
consensus.nlastValidPowHashHeight = 590000;
consensus.nlastValidPowHashHeight = 659006;
chainTxData = ChainTxData{
// BTX: data as of block 0x8da1c7f79018fac8acac69a57b2f8b5d2743af67976a4525fdedc8c85a3a1418 (height 410476).
1588381219, // * UNIX timestamp of last known number of transactions
Expand Down
21 changes: 21 additions & 0 deletions src/consensus/tx_verify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,33 @@ bool Consensus::CheckTxInputs(const CTransaction& tx, CValidationState& state, c
}
else
{
/*
if (coin.IsCoinBase() && nSpendHeight - coin.nHeight < (!sporkManager.IsSporkActive(SPORK_BTX_16_COINBASE_MATURITY_STAGE_3)? COINBASE_MATURITY_2 : COINBASE_MATURITY_3 ))
{
return state.Invalid(false,
REJECT_INVALID, "bad-txns-premature-spend-of-coinbase",
strprintf("tried to spend coinbase at depth %d", nSpendHeight - coin.nHeight));
}
*/
if (AHeight < 659003)
{
if (coin.IsCoinBase() && nSpendHeight - coin.nHeight < COINBASE_MATURITY_2 )
{
return state.Invalid(false,
REJECT_INVALID, "bad-txns-premature-spend-of-coinbase",
strprintf("tried to spend coinbase at depth %d", nSpendHeight - coin.nHeight));
}
}
else
{
if (coin.IsCoinBase() && nSpendHeight - coin.nHeight < COINBASE_MATURITY_3 )
{
return state.Invalid(false,
REJECT_INVALID, "bad-txns-premature-spend-of-coinbase",
strprintf("tried to spend coinbase at depth %d", nSpendHeight - coin.nHeight));
}
}

}
/*
if (coin.IsCoinBase() && nSpendHeight - coin.nHeight < (!sporkManager.IsSporkActive(SPORK_BTX_16_COINBASE_MATURITY_STAGE_3)? COINBASE_MATURITY_2 : COINBASE_MATURITY_3 )) {
Expand Down
4 changes: 2 additions & 2 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5612,9 +5612,9 @@ int CMerkleTx::GetBlocksToMaturity() const
chain_depth = 0;
// FXTC END
assert(chain_depth >= 0); // coinbase tx should not be conflicted
//return std::max(0, (COINBASE_MATURITY+1) - chain_depth);
return std::max(0, (COINBASE_MATURITY_3 +1) - chain_depth);
// BTX BEGIN
return std::max(0, ((!sporkManager.IsSporkActive(SPORK_BTX_15_COINBASE_MATURITY_STAGE_2)? COINBASE_MATURITY : COINBASE_MATURITY_2 )+1) - chain_depth);
//return std::max(0, ((!sporkManager.IsSporkActive(SPORK_BTX_15_COINBASE_MATURITY_STAGE_2)? COINBASE_MATURITY : //COINBASE_MATURITY_3 )+1) - chain_depth);
// BTX END
}

Expand Down

0 comments on commit 06d7536

Please sign in to comment.