aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_bitcoin.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-09-24 17:15:50 -0400
committerMarcoFalke <falke.marco@gmail.com>2018-09-24 17:24:06 -0400
commit4dac24db23d121ec21080f04e210227c4ff5d281 (patch)
tree5a52e0cac560035ee69bcee8f5d06be92f3366e2 /src/test/test_bitcoin.cpp
parent990fc0de1afdfac8b711f39d9dbbab0c5f88a4c5 (diff)
parent6fa901fb4726ddac025d5396ecf09d047a8aa9a1 (diff)
downloadbitcoin-4dac24db23d121ec21080f04e210227c4ff5d281.tar.xz
Merge #13311: Don't edit Chainparams after initialization
6fa901fb47 Don't edit Chainparams after initialization (Jorge Timón) 980b38f8a1 MOVEONLY: Move versionbits info out of versionbits.o (Jorge Timón) Pull request description: This encapsulates the "-vbparams" option, which is only meant for regtest, directly on CRegTestParams. This is a refactor and doesn't change functionality. Related to https://github.com/bitcoin/bitcoin/pull/8994 Tree-SHA512: 79771d729a63a720e743a9c77d5e2d80369f072d66202a43c1304e83a7d0ef7c6103d4968a03aea9666cc89a7203c618da972124a677b38cfe62ddaeb28f9f5d
Diffstat (limited to 'src/test/test_bitcoin.cpp')
-rw-r--r--src/test/test_bitcoin.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index 766e34e5b5..f7874e6882 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -6,6 +6,7 @@
#include <chainparams.h>
#include <consensus/consensus.h>
+#include <consensus/params.h>
#include <consensus/validation.h>
#include <crypto/sha256.h>
#include <miner.h>
@@ -58,6 +59,9 @@ BasicTestingSetup::BasicTestingSetup(const std::string& chainName)
InitSignatureCache();
InitScriptExecutionCache();
fCheckBlockIndex = true;
+ // CreateAndProcessBlock() does not support building SegWit blocks, so don't activate in these tests.
+ // TODO: fix the code to support SegWit blocks.
+ gArgs.ForceSetArg("-vbparams", strprintf("segwit:0:%d", (int64_t)Consensus::BIP9Deployment::NO_TIMEOUT));
SelectParams(chainName);
noui_connect();
}
@@ -128,9 +132,6 @@ TestingSetup::~TestingSetup()
TestChain100Setup::TestChain100Setup() : TestingSetup(CBaseChainParams::REGTEST)
{
- // CreateAndProcessBlock() does not support building SegWit blocks, so don't activate in these tests.
- // TODO: fix the code to support SegWit blocks.
- UpdateVersionBitsParameters(Consensus::DEPLOYMENT_SEGWIT, 0, Consensus::BIP9Deployment::NO_TIMEOUT);
// Generate a 100-block chain:
coinbaseKey.MakeNewKey(true);
CScript scriptPubKey = CScript() << ToByteVector(coinbaseKey.GetPubKey()) << OP_CHECKSIG;