Merge pull request #2555 from codablock/pr_testnetreset_v12
Reset/Fork testnet to block 4000 and prepare v0.12.3.4 release
This commit is contained in:
commit
f5b4026d6b
@ -3,7 +3,7 @@ AC_PREREQ([2.60])
|
|||||||
define(_CLIENT_VERSION_MAJOR, 0)
|
define(_CLIENT_VERSION_MAJOR, 0)
|
||||||
define(_CLIENT_VERSION_MINOR, 12)
|
define(_CLIENT_VERSION_MINOR, 12)
|
||||||
define(_CLIENT_VERSION_REVISION, 3)
|
define(_CLIENT_VERSION_REVISION, 3)
|
||||||
define(_CLIENT_VERSION_BUILD, 3)
|
define(_CLIENT_VERSION_BUILD, 4)
|
||||||
define(_CLIENT_VERSION_IS_RELEASE, true)
|
define(_CLIENT_VERSION_IS_RELEASE, true)
|
||||||
define(_COPYRIGHT_YEAR, 2018)
|
define(_COPYRIGHT_YEAR, 2018)
|
||||||
define(_COPYRIGHT_HOLDERS,[The %s developers])
|
define(_COPYRIGHT_HOLDERS,[The %s developers])
|
||||||
|
@ -41,7 +41,7 @@ PROJECT_NAME = "Dash Core"
|
|||||||
# could be handy for archiving the generated documentation or if some version
|
# could be handy for archiving the generated documentation or if some version
|
||||||
# control system is used.
|
# control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = 0.12.3.3
|
PROJECT_NUMBER = 0.12.3.4
|
||||||
|
|
||||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||||
# for a project that appears at the top of each page and should give viewer a
|
# for a project that appears at the top of each page and should give viewer a
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
Dash Core version 0.12.3.3
|
Dash Core version 0.12.3.4
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
Release is now available from:
|
Release is now available from:
|
||||||
|
|
||||||
<https://www.dash.org/downloads/#wallets>
|
<https://www.dash.org/downloads/#wallets>
|
||||||
|
|
||||||
This is a critical bugfix release.
|
This is an optional release and only contains changes for testnet. It is not required to update masternodes on mainnet.
|
||||||
|
|
||||||
Please report bugs using the issue tracker at github:
|
Please report bugs using the issue tracker at github:
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ the database if you decide to use any pre-0.12.2.2 version.
|
|||||||
|
|
||||||
Wallet forward or backward compatibility was not affected.
|
Wallet forward or backward compatibility was not affected.
|
||||||
|
|
||||||
### Downgrade to 0.12.2.2/3, 0.12.3.1/2
|
### Downgrade to 0.12.3.1/2/3
|
||||||
|
|
||||||
Downgrading to these versions does not require any additional actions, should be
|
Downgrading to these versions does not require any additional actions, should be
|
||||||
fully compatible.
|
fully compatible.
|
||||||
@ -43,16 +43,18 @@ fully compatible.
|
|||||||
Notable changes
|
Notable changes
|
||||||
===============
|
===============
|
||||||
|
|
||||||
Fix crash bug with duplicate inputs within a transaction
|
Fork/Reset testnet at block 4001
|
||||||
--------------------------------------------------------
|
--------------------------------
|
||||||
|
|
||||||
There was a critical bug discovered in Bitcoin Core's codebase recently which
|
This release is NOT required on mainnet. It is intended to be deployed on testnet and will cause a fork at block 4001.
|
||||||
can cause node receiving a block to crash https://github.com/bitcoin/bitcoin/pull/14247
|
The plan is to restart all testing for the v0.13.0.0 upgrade process.
|
||||||
|
|
||||||
0.12.3.3 Change log
|
When deployed on testnet, it is required to start with a fresh data directory or call Dash Core with `-reindex-chainstate`.
|
||||||
|
|
||||||
|
0.12.3.4 Change log
|
||||||
===================
|
===================
|
||||||
|
|
||||||
See detailed [set of changes](https://github.com/dashpay/dash/compare/v0.12.3.2...dashpay:v0.12.3.3).
|
See detailed [set of changes](https://github.com/dashpay/dash/compare/v0.12.3.3...dashpay:v0.12.3.4).
|
||||||
|
|
||||||
Credits
|
Credits
|
||||||
=======
|
=======
|
||||||
@ -84,6 +86,7 @@ Dash Core tree 0.12.1.x was a fork of Bitcoin Core tree 0.12.
|
|||||||
|
|
||||||
These release are considered obsolete. Old release notes can be found here:
|
These release are considered obsolete. Old release notes can be found here:
|
||||||
|
|
||||||
|
- [v0.12.3.3](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.3.3.md) released Sep/19/2018
|
||||||
- [v0.12.3.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.3.2.md) released Jul/09/2018
|
- [v0.12.3.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.3.2.md) released Jul/09/2018
|
||||||
- [v0.12.3.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.3.1.md) released Jul/03/2018
|
- [v0.12.3.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.3.1.md) released Jul/03/2018
|
||||||
- [v0.12.2.3](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.2.3.md) released Jan/12/2018
|
- [v0.12.2.3](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.2.3.md) released Jan/12/2018
|
||||||
|
99
doc/release-notes/dash/release-notes-0.12.3.3.md
Normal file
99
doc/release-notes/dash/release-notes-0.12.3.3.md
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
Dash Core version 0.12.3.3
|
||||||
|
==========================
|
||||||
|
|
||||||
|
Release is now available from:
|
||||||
|
|
||||||
|
<https://www.dash.org/downloads/#wallets>
|
||||||
|
|
||||||
|
This is a critical bugfix release.
|
||||||
|
|
||||||
|
Please report bugs using the issue tracker at github:
|
||||||
|
|
||||||
|
<https://github.com/dashpay/dash/issues>
|
||||||
|
|
||||||
|
|
||||||
|
Upgrading and downgrading
|
||||||
|
=========================
|
||||||
|
|
||||||
|
How to Upgrade
|
||||||
|
--------------
|
||||||
|
|
||||||
|
If you are running an older version, shut it down. Wait until it has completely
|
||||||
|
shut down (which might take a few minutes for older versions), then run the
|
||||||
|
installer (on Windows) or just copy over /Applications/Dash-Qt (on Mac) or
|
||||||
|
dashd/dash-qt (on Linux).
|
||||||
|
|
||||||
|
Downgrade warning
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
### Downgrade to a version < 0.12.2.2
|
||||||
|
|
||||||
|
Because release 0.12.2.2 included the [per-UTXO fix](release-notes/dash/release-notes-0.12.2.2.md#per-utxo-fix)
|
||||||
|
which changed the structure of the internal database, you will have to reindex
|
||||||
|
the database if you decide to use any pre-0.12.2.2 version.
|
||||||
|
|
||||||
|
Wallet forward or backward compatibility was not affected.
|
||||||
|
|
||||||
|
### Downgrade to 0.12.2.2/3, 0.12.3.1/2
|
||||||
|
|
||||||
|
Downgrading to these versions does not require any additional actions, should be
|
||||||
|
fully compatible.
|
||||||
|
|
||||||
|
|
||||||
|
Notable changes
|
||||||
|
===============
|
||||||
|
|
||||||
|
Fix crash bug with duplicate inputs within a transaction
|
||||||
|
--------------------------------------------------------
|
||||||
|
|
||||||
|
There was a critical bug discovered in Bitcoin Core's codebase recently which
|
||||||
|
can cause node receiving a block to crash https://github.com/bitcoin/bitcoin/pull/14247
|
||||||
|
|
||||||
|
0.12.3.3 Change log
|
||||||
|
===================
|
||||||
|
|
||||||
|
See detailed [set of changes](https://github.com/dashpay/dash/compare/v0.12.3.2...dashpay:v0.12.3.3).
|
||||||
|
|
||||||
|
Credits
|
||||||
|
=======
|
||||||
|
|
||||||
|
Thanks to everyone who directly contributed to this release,
|
||||||
|
as well as everyone who submitted issues and reviewed pull requests.
|
||||||
|
|
||||||
|
|
||||||
|
Older releases
|
||||||
|
==============
|
||||||
|
|
||||||
|
Dash was previously known as Darkcoin.
|
||||||
|
|
||||||
|
Darkcoin tree 0.8.x was a fork of Litecoin tree 0.8, original name was XCoin
|
||||||
|
which was first released on Jan/18/2014.
|
||||||
|
|
||||||
|
Darkcoin tree 0.9.x was the open source implementation of masternodes based on
|
||||||
|
the 0.8.x tree and was first released on Mar/13/2014.
|
||||||
|
|
||||||
|
Darkcoin tree 0.10.x used to be the closed source implementation of Darksend
|
||||||
|
which was released open source on Sep/25/2014.
|
||||||
|
|
||||||
|
Dash Core tree 0.11.x was a fork of Bitcoin Core tree 0.9,
|
||||||
|
Darkcoin was rebranded to Dash.
|
||||||
|
|
||||||
|
Dash Core tree 0.12.0.x was a fork of Bitcoin Core tree 0.10.
|
||||||
|
|
||||||
|
Dash Core tree 0.12.1.x was a fork of Bitcoin Core tree 0.12.
|
||||||
|
|
||||||
|
These release are considered obsolete. Old release notes can be found here:
|
||||||
|
|
||||||
|
- [v0.12.3.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.3.2.md) released Jul/09/2018
|
||||||
|
- [v0.12.3.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.3.1.md) released Jul/03/2018
|
||||||
|
- [v0.12.2.3](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.2.3.md) released Jan/12/2018
|
||||||
|
- [v0.12.2.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.2.2.md) released Dec/17/2017
|
||||||
|
- [v0.12.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.2.md) released Nov/08/2017
|
||||||
|
- [v0.12.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.1.md) released Feb/06/2017
|
||||||
|
- [v0.12.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.0.md) released Jun/15/2015
|
||||||
|
- [v0.11.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.11.2.md) released Mar/04/2015
|
||||||
|
- [v0.11.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.11.1.md) released Feb/10/2015
|
||||||
|
- [v0.11.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.11.0.md) released Jan/15/2015
|
||||||
|
- [v0.10.x](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.10.0.md) released Sep/25/2014
|
||||||
|
- [v0.9.x](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.9.0.md) released Mar/13/2014
|
||||||
|
|
@ -285,7 +285,7 @@ public:
|
|||||||
consensus.nBudgetPaymentsCycleBlocks = 50;
|
consensus.nBudgetPaymentsCycleBlocks = 50;
|
||||||
consensus.nBudgetPaymentsWindowBlocks = 10;
|
consensus.nBudgetPaymentsWindowBlocks = 10;
|
||||||
consensus.nSuperblockStartBlock = 4200; // NOTE: Should satisfy nSuperblockStartBlock > nBudgetPeymentsStartBlock
|
consensus.nSuperblockStartBlock = 4200; // NOTE: Should satisfy nSuperblockStartBlock > nBudgetPeymentsStartBlock
|
||||||
consensus.nSuperblockStartHash = uint256S("00000000cffabc0f646867fba0550afd6e30e0f4b0fc54e34d3e101a1552df5d");
|
consensus.nSuperblockStartHash = uint256(); // do not check this on testnet
|
||||||
consensus.nSuperblockCycle = 24; // Superblocks can be issued hourly on testnet
|
consensus.nSuperblockCycle = 24; // Superblocks can be issued hourly on testnet
|
||||||
consensus.nGovernanceMinQuorum = 1;
|
consensus.nGovernanceMinQuorum = 1;
|
||||||
consensus.nGovernanceFilterElements = 500;
|
consensus.nGovernanceFilterElements = 500;
|
||||||
@ -300,8 +300,8 @@ public:
|
|||||||
consensus.nPowTargetSpacing = 2.5 * 60; // Dash: 2.5 minutes
|
consensus.nPowTargetSpacing = 2.5 * 60; // Dash: 2.5 minutes
|
||||||
consensus.fPowAllowMinDifficultyBlocks = true;
|
consensus.fPowAllowMinDifficultyBlocks = true;
|
||||||
consensus.fPowNoRetargeting = false;
|
consensus.fPowNoRetargeting = false;
|
||||||
consensus.nPowKGWHeight = 4001; // nPowKGWHeight >= nPowDGWHeight means "no KGW"
|
consensus.nPowKGWHeight = 4002; // nPowKGWHeight >= nPowDGWHeight means "no KGW"
|
||||||
consensus.nPowDGWHeight = 4001;
|
consensus.nPowDGWHeight = 4002;
|
||||||
consensus.nRuleChangeActivationThreshold = 1512; // 75% for testchains
|
consensus.nRuleChangeActivationThreshold = 1512; // 75% for testchains
|
||||||
consensus.nMinerConfirmationWindow = 2016; // nPowTargetTimespan / nPowTargetSpacing
|
consensus.nMinerConfirmationWindow = 2016; // nPowTargetTimespan / nPowTargetSpacing
|
||||||
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;
|
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;
|
||||||
@ -310,28 +310,28 @@ public:
|
|||||||
|
|
||||||
// Deployment of BIP68, BIP112, and BIP113.
|
// Deployment of BIP68, BIP112, and BIP113.
|
||||||
consensus.vDeployments[Consensus::DEPLOYMENT_CSV].bit = 0;
|
consensus.vDeployments[Consensus::DEPLOYMENT_CSV].bit = 0;
|
||||||
consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 1506556800; // September 28th, 2017
|
consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 1544655600; // Dec 13th, 2018
|
||||||
consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 1538092800; // September 28th, 2018
|
consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 1576191600; // Dec 13th, 2019
|
||||||
|
|
||||||
// Deployment of DIP0001
|
// Deployment of DIP0001
|
||||||
consensus.vDeployments[Consensus::DEPLOYMENT_DIP0001].bit = 1;
|
consensus.vDeployments[Consensus::DEPLOYMENT_DIP0001].bit = 1;
|
||||||
consensus.vDeployments[Consensus::DEPLOYMENT_DIP0001].nStartTime = 1505692800; // Sep 18th, 2017
|
consensus.vDeployments[Consensus::DEPLOYMENT_DIP0001].nStartTime = 1544655600; // Dec 13th, 2018
|
||||||
consensus.vDeployments[Consensus::DEPLOYMENT_DIP0001].nTimeout = 1537228800; // Sep 18th, 2018
|
consensus.vDeployments[Consensus::DEPLOYMENT_DIP0001].nTimeout = 1576191600; // Dec 13th, 2019
|
||||||
consensus.vDeployments[Consensus::DEPLOYMENT_DIP0001].nWindowSize = 100;
|
consensus.vDeployments[Consensus::DEPLOYMENT_DIP0001].nWindowSize = 100;
|
||||||
consensus.vDeployments[Consensus::DEPLOYMENT_DIP0001].nThreshold = 50; // 50% of 100
|
consensus.vDeployments[Consensus::DEPLOYMENT_DIP0001].nThreshold = 50; // 50% of 100
|
||||||
|
|
||||||
// Deployment of BIP147
|
// Deployment of BIP147
|
||||||
consensus.vDeployments[Consensus::DEPLOYMENT_BIP147].bit = 2;
|
consensus.vDeployments[Consensus::DEPLOYMENT_BIP147].bit = 2;
|
||||||
consensus.vDeployments[Consensus::DEPLOYMENT_BIP147].nStartTime = 1517792400; // Feb 5th, 2018
|
consensus.vDeployments[Consensus::DEPLOYMENT_BIP147].nStartTime = 1544655600; // Dec 13th, 2018
|
||||||
consensus.vDeployments[Consensus::DEPLOYMENT_BIP147].nTimeout = 1549328400; // Feb 5th, 2019
|
consensus.vDeployments[Consensus::DEPLOYMENT_BIP147].nTimeout = 1576191600; // Dec 13th, 2019
|
||||||
consensus.vDeployments[Consensus::DEPLOYMENT_BIP147].nWindowSize = 100;
|
consensus.vDeployments[Consensus::DEPLOYMENT_BIP147].nWindowSize = 100;
|
||||||
consensus.vDeployments[Consensus::DEPLOYMENT_BIP147].nThreshold = 50; // 50% of 100
|
consensus.vDeployments[Consensus::DEPLOYMENT_BIP147].nThreshold = 50; // 50% of 100
|
||||||
|
|
||||||
// The best chain should have at least this much work.
|
// The best chain should have at least this much work.
|
||||||
consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000000000003be69c34b1244f"); // 143200
|
consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000000000000003cd72a542"); // 4000
|
||||||
|
|
||||||
// By default assume that the signatures in ancestors of this block are valid.
|
// By default assume that the signatures in ancestors of this block are valid.
|
||||||
consensus.defaultAssumeValid = uint256S("0x0000000004a7878409189b7a8f75b3815d9b8c45ee8f79955a6c727d83bddb04"); // 143200
|
consensus.defaultAssumeValid = uint256S("0x00000ce22113f3eb8636e225d6a1691e132fdd587aed993e1bc9b07a0235eea4"); // 4000
|
||||||
|
|
||||||
pchMessageStart[0] = 0xce;
|
pchMessageStart[0] = 0xce;
|
||||||
pchMessageStart[1] = 0xe2;
|
pchMessageStart[1] = 0xe2;
|
||||||
@ -383,13 +383,11 @@ public:
|
|||||||
( 261, uint256S("0x00000c26026d0815a7e2ce4fa270775f61403c040647ff2c3091f99e894a4618"))
|
( 261, uint256S("0x00000c26026d0815a7e2ce4fa270775f61403c040647ff2c3091f99e894a4618"))
|
||||||
( 1999, uint256S("0x00000052e538d27fa53693efe6fb6892a0c1d26c0235f599171c48a3cce553b1"))
|
( 1999, uint256S("0x00000052e538d27fa53693efe6fb6892a0c1d26c0235f599171c48a3cce553b1"))
|
||||||
( 2999, uint256S("0x0000024bc3f4f4cb30d29827c13d921ad77d2c6072e586c7f60d83c2722cdcc5"))
|
( 2999, uint256S("0x0000024bc3f4f4cb30d29827c13d921ad77d2c6072e586c7f60d83c2722cdcc5"))
|
||||||
( 100000, uint256S("0x0000000003aa53e24b6e60ef97642e4193611f2bcb75ea1fa8105f0b5ffd5242"))
|
|
||||||
( 143200, uint256S("0x0000000004a7878409189b7a8f75b3815d9b8c45ee8f79955a6c727d83bddb04"))
|
|
||||||
};
|
};
|
||||||
|
|
||||||
chainTxData = ChainTxData{
|
chainTxData = ChainTxData{
|
||||||
1529294335, // * UNIX timestamp of last known number of transactions
|
1544707462, // * UNIX timestamp of last known number of transactions
|
||||||
5810120, // * total number of transactions between genesis and that timestamp
|
4100, // * total number of transactions between genesis and that timestamp
|
||||||
// (the tx=... number in the SetBestChain debug.log lines)
|
// (the tx=... number in the SetBestChain debug.log lines)
|
||||||
0.01 // * estimated number of transactions per second after that timestamp
|
0.01 // * estimated number of transactions per second after that timestamp
|
||||||
};
|
};
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#define CLIENT_VERSION_MAJOR 0
|
#define CLIENT_VERSION_MAJOR 0
|
||||||
#define CLIENT_VERSION_MINOR 12
|
#define CLIENT_VERSION_MINOR 12
|
||||||
#define CLIENT_VERSION_REVISION 3
|
#define CLIENT_VERSION_REVISION 3
|
||||||
#define CLIENT_VERSION_BUILD 3
|
#define CLIENT_VERSION_BUILD 4
|
||||||
|
|
||||||
//! Set to true for release, false for prerelease or test build
|
//! Set to true for release, false for prerelease or test build
|
||||||
#define CLIENT_VERSION_IS_RELEASE true
|
#define CLIENT_VERSION_IS_RELEASE true
|
||||||
|
47
src/pow.cpp
47
src/pow.cpp
@ -89,43 +89,18 @@ unsigned int static DarkGravityWave(const CBlockIndex* pindexLast, const CBlockH
|
|||||||
return bnPowLimit.GetCompact();
|
return bnPowLimit.GetCompact();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.fPowAllowMinDifficultyBlocks && (
|
if (params.fPowAllowMinDifficultyBlocks) {
|
||||||
// testnet ...
|
// recent block is more than 2 hours old
|
||||||
(params.hashDevnetGenesisBlock.IsNull() && pindexLast->nChainWork >= UintToArith256(uint256S("0x000000000000000000000000000000000000000000000000003e9ccfe0e03e01"))) ||
|
if (pblock->GetBlockTime() > pindexLast->GetBlockTime() + 2 * 60 * 60) {
|
||||||
// or devnet
|
return bnPowLimit.GetCompact();
|
||||||
!params.hashDevnetGenesisBlock.IsNull())) {
|
}
|
||||||
// NOTE: 000000000000000000000000000000000000000000000000003e9ccfe0e03e01 is the work of the "wrong" chain,
|
// recent block is more than 10 minutes old
|
||||||
// so this rule activates there immediately and new blocks with high diff from that chain are going
|
if (pblock->GetBlockTime() > pindexLast->GetBlockTime() + params.nPowTargetSpacing * 4) {
|
||||||
// to be rejected by updated nodes. Note, that old nodes are going to reject blocks from updated nodes
|
arith_uint256 bnNew = arith_uint256().SetCompact(pindexLast->nBits) * 10;
|
||||||
// after the "right" chain reaches this amount of work too. This is a temporary condition which should
|
if (bnNew > bnPowLimit) {
|
||||||
// be removed when we decide to hard-fork testnet again.
|
bnNew = bnPowLimit;
|
||||||
// TODO: remove "testnet+work OR devnet" part on next testnet hard-fork
|
|
||||||
// Special difficulty rule for testnet/devnet:
|
|
||||||
// If the new block's timestamp is more than 2* 2.5 minutes
|
|
||||||
// then allow mining of a min-difficulty block.
|
|
||||||
|
|
||||||
// start using smoother adjustment on testnet when total work hits
|
|
||||||
// 000000000000000000000000000000000000000000000000003ff00000000000
|
|
||||||
if (pindexLast->nChainWork >= UintToArith256(uint256S("0x000000000000000000000000000000000000000000000000003ff00000000000"))
|
|
||||||
// and immediately on devnet
|
|
||||||
|| !params.hashDevnetGenesisBlock.IsNull()) {
|
|
||||||
// recent block is more than 2 hours old
|
|
||||||
if (pblock->GetBlockTime() > pindexLast->GetBlockTime() + 2 * 60 * 60) {
|
|
||||||
return bnPowLimit.GetCompact();
|
|
||||||
}
|
|
||||||
// recent block is more than 10 minutes old
|
|
||||||
if (pblock->GetBlockTime() > pindexLast->GetBlockTime() + params.nPowTargetSpacing*4) {
|
|
||||||
arith_uint256 bnNew = arith_uint256().SetCompact(pindexLast->nBits) * 10;
|
|
||||||
if (bnNew > bnPowLimit) {
|
|
||||||
bnNew = bnPowLimit;
|
|
||||||
}
|
|
||||||
return bnNew.GetCompact();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// old stuff
|
|
||||||
if (pblock->GetBlockTime() > pindexLast->GetBlockTime() + params.nPowTargetSpacing*2) {
|
|
||||||
return bnPowLimit.GetCompact();
|
|
||||||
}
|
}
|
||||||
|
return bnNew.GetCompact();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user