Skip to content

Commit dd154b0

Browse files
committed
consensus: lower regtest nPowTargetTimespan to 144
This currently has no effect due to fPowNoRetargeting, except for the getnetworkhashps when called with -1. It will when the next commit enforces the timewarp attack mitigation on regtest.
1 parent d79ea80 commit dd154b0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/kernel/chainparams.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ class CRegTestParams : public CChainParams
537537
consensus.SegwitHeight = 0; // Always active unless overridden
538538
consensus.MinBIP9WarningHeight = 0;
539539
consensus.powLimit = uint256{"7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"};
540-
consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks
540+
consensus.nPowTargetTimespan = 24 * 60 * 60; // one day
541541
consensus.nPowTargetSpacing = 10 * 60;
542542
consensus.fPowAllowMinDifficultyBlocks = true;
543543
consensus.enforce_BIP94 = false;

test/functional/rpc_blockchain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
TIME_RANGE_MTP = TIME_GENESIS_BLOCK + (HEIGHT - 6) * TIME_RANGE_STEP
5959
TIME_RANGE_TIP = TIME_GENESIS_BLOCK + (HEIGHT - 1) * TIME_RANGE_STEP
6060
TIME_RANGE_END = TIME_GENESIS_BLOCK + HEIGHT * TIME_RANGE_STEP
61-
DIFFICULTY_ADJUSTMENT_INTERVAL = 2016
61+
DIFFICULTY_ADJUSTMENT_INTERVAL = 144
6262

6363

6464
class BlockchainTest(BitcoinTestFramework):

0 commit comments

Comments
 (0)