Skip to content

Commit de842cb

Browse files
committed
Merge #432: [0.17] QA: Use resgtest2 chain instead of regtest for rpc tests
a1e0c56 QA: Use resgtest2 chain instead of regtest for rpc tests (Jorge Timón) 4454c52 QA: Adapt BitcoinTestFramework for chains other than "regtest" (Jorge Timón) a06be15 Testchains: Introduce custom chain whose constructor... (Jorge Timón) 46749eb Testchains: Qt: Simplify network/chain styles and add a default purple (Jorge Timón) c0c1e38 Testchains: Generic selection with -chain=<str> in addition of -testnet and -regtest (Jorge Timón) 56515c3 9102: Really don't validate genesis block (Gregory Sanders) Pull request description: Backport of bitcoin/bitcoin#8994 The tests seem to pass with: ``` python3 ./test/functional/test_runner.py -j4 --extended ``` Let's please try to keep all general review things on bitcoin/bitcoin#8994 and elements-specific things here. Dependencies: - [x] [0.17] Don't edit Chainparams after initialization #427 - [x] [0.17] Test: Fix example_test.py #434 Tree-SHA512: e216587b6f9d3a462372915e01c8eb3c65a61e4ea29f398e65a7fc03a3ea5676c4711527b5cc2c115893591e7cd5b0ecd2f1fac4faf7ef747a022e2657bc99d4
2 parents 5042698 + a1e0c56 commit de842cb

33 files changed

+336
-247
lines changed

src/bitcoin-cli.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static int AppInitRPC(int argc, char* argv[])
129129
fprintf(stderr, "Error reading configuration file: %s\n", error.c_str());
130130
return EXIT_FAILURE;
131131
}
132-
// Check for -testnet or -regtest parameter (BaseParams() calls are only valid after this clause)
132+
// Check for -chain, -testnet or -regtest parameter (BaseParams() calls are only valid after this clause)
133133
try {
134134
SelectBaseParams(gArgs.GetChainName());
135135
} catch (const std::exception& e) {

src/bitcoin-tx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static int AppInitRawTx(int argc, char* argv[])
8686
return EXIT_FAILURE;
8787
}
8888

89-
// Check for -testnet or -regtest parameter (Params() calls are only valid after this clause)
89+
// Check for -chain, -testnet or -regtest parameter (Params() calls are only valid after this clause)
9090
try {
9191
SelectParams(gArgs.GetChainName());
9292
} catch (const std::exception& e) {

src/bitcoind.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static bool AppInit(int argc, char* argv[])
9898
fprintf(stderr, "Error reading configuration file: %s\n", error.c_str());
9999
return false;
100100
}
101-
// Check for -testnet or -regtest parameter (Params() calls are only valid after this clause)
101+
// Check for -chain, -testnet or -regtest parameter (Params() calls are only valid after this clause)
102102
try {
103103
SelectParams(gArgs.GetChainName());
104104
} catch (const std::exception& e) {

src/chainparams.cpp

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,73 @@ void CRegTestParams::UpdateVersionBitsParametersFromArgs(const ArgsManager& args
395395
}
396396
}
397397

398+
/**
399+
* Custom params for testing.
400+
*/
401+
class CCustomParams : public CRegTestParams {
402+
void UpdateFromArgs(ArgsManager& args)
403+
{
404+
UpdateVersionBitsParametersFromArgs(args);
405+
406+
consensus.nSubsidyHalvingInterval = args.GetArg("-con_nsubsidyhalvinginterval", consensus.nSubsidyHalvingInterval);
407+
consensus.BIP16Exception = uint256S(args.GetArg("-con_bip16exception", "0x0"));
408+
consensus.BIP34Height = args.GetArg("-con_bip34height", consensus.BIP34Height);
409+
consensus.BIP34Hash = uint256S(args.GetArg("-con_bip34hash", "0x0"));
410+
consensus.BIP65Height = args.GetArg("-con_bip65height", consensus.BIP65Height);
411+
consensus.BIP66Height = args.GetArg("-con_bip66height", consensus.BIP66Height);
412+
consensus.powLimit = uint256S(args.GetArg("-con_powlimit", "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"));
413+
consensus.nPowTargetTimespan = args.GetArg("-con_npowtargettimespan", consensus.nPowTargetTimespan);
414+
consensus.nPowTargetSpacing = args.GetArg("-con_npowtargetspacing", consensus.nPowTargetSpacing);
415+
consensus.fPowAllowMinDifficultyBlocks = args.GetBoolArg("-con_fpowallowmindifficultyblocks", consensus.fPowAllowMinDifficultyBlocks);
416+
consensus.fPowNoRetargeting = args.GetBoolArg("-con_fpownoretargeting", consensus.fPowNoRetargeting);
417+
consensus.nRuleChangeActivationThreshold = (uint32_t)args.GetArg("-con_nrulechangeactivationthreshold", consensus.nRuleChangeActivationThreshold);
418+
consensus.nMinerConfirmationWindow = (uint32_t)args.GetArg("-con_nminerconfirmationwindow", consensus.nMinerConfirmationWindow);
419+
420+
consensus.nMinimumChainWork = uint256S(args.GetArg("-con_nminimumchainwork", "0x0"));
421+
consensus.defaultAssumeValid = uint256S(args.GetArg("-con_defaultassumevalid", "0x00"));
422+
423+
nPruneAfterHeight = (uint64_t)args.GetArg("-npruneafterheight", nPruneAfterHeight);
424+
fDefaultConsistencyChecks = args.GetBoolArg("-fdefaultconsistencychecks", fDefaultConsistencyChecks);
425+
fMineBlocksOnDemand = args.GetBoolArg("-fmineblocksondemand", fMineBlocksOnDemand);
426+
m_fallback_fee_enabled = args.GetBoolArg("-fallback_fee_enabled", m_fallback_fee_enabled);
427+
428+
bech32_hrp = args.GetArg("-bech32_hrp", bech32_hrp);
429+
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1, args.GetArg("-pubkeyprefix", 111));
430+
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1, args.GetArg("-scriptprefix", 196));
431+
base58Prefixes[SECRET_KEY] = std::vector<unsigned char>(1, args.GetArg("-secretprefix", 239));
432+
433+
std::string extpubprefix = args.GetArg("-extpubkeyprefix", "043587CF");
434+
assert(IsHex(extpubprefix) && extpubprefix.size() == 8 && "-extpubkeyprefix must be hex string of length 8");
435+
base58Prefixes[EXT_PUBLIC_KEY] = ParseHex(extpubprefix);
436+
437+
std::string extprvprefix = args.GetArg("-extprvkeyprefix", "04358394");
438+
assert(IsHex(extprvprefix) && extprvprefix.size() == 8 && "-extprvkeyprefix must be hex string of length 8");
439+
base58Prefixes[EXT_SECRET_KEY] = ParseHex(extprvprefix);
440+
441+
const std::string magic_str = args.GetArg("-pchmessagestart", "FABFB5DA");
442+
assert(IsHex(magic_str) && magic_str.size() == 8 && "-pchmessagestart must be hex string of length 8");
443+
const std::vector<unsigned char> magic_byte = ParseHex(magic_str);
444+
std::copy(begin(magic_byte), end(magic_byte), pchMessageStart);
445+
446+
vSeeds.clear();
447+
if (gArgs.IsArgSet("-seednode")) {
448+
const auto seednodes = gArgs.GetArgs("-seednode");
449+
if (seednodes.size() != 1 || seednodes[0] != "0") {
450+
vSeeds = seednodes;
451+
}
452+
}
453+
}
454+
455+
public:
456+
CCustomParams(const std::string& chain, ArgsManager& args) : CRegTestParams(args)
457+
{
458+
strNetworkID = chain;
459+
UpdateFromArgs(args);
460+
genesis = CreateGenesisBlock(strNetworkID.c_str(), CScript(OP_TRUE), 1296688602, 2, 0x207fffff, 1, 50 * COIN);
461+
consensus.hashGenesisBlock = genesis.GetHash();
462+
}
463+
};
464+
398465
static std::unique_ptr<const CChainParams> globalChainParams;
399466

400467
const CChainParams &Params() {
@@ -404,13 +471,15 @@ const CChainParams &Params() {
404471

405472
std::unique_ptr<const CChainParams> CreateChainParams(const std::string& chain)
406473
{
474+
// Reserved names for non-custom chains
407475
if (chain == CBaseChainParams::MAIN)
408476
return std::unique_ptr<CChainParams>(new CMainParams());
409477
else if (chain == CBaseChainParams::TESTNET)
410478
return std::unique_ptr<CChainParams>(new CTestNetParams());
411479
else if (chain == CBaseChainParams::REGTEST)
412480
return std::unique_ptr<CChainParams>(new CRegTestParams(gArgs));
413-
throw std::runtime_error(strprintf("%s: Unknown chain %s.", __func__, chain));
481+
482+
return std::unique_ptr<CChainParams>(new CCustomParams(chain, gArgs));
414483
}
415484

416485
void SelectParams(const std::string& network)

src/chainparamsbase.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ const std::string CBaseChainParams::REGTEST = "regtest";
1717

1818
void SetupChainParamsBaseOptions()
1919
{
20+
gArgs.AddArg("-chain=<chain>", "Use the chain <chain> (default: main). Reserved values: main, test, regtest", false, OptionsCategory::CHAINPARAMS);
2021
gArgs.AddArg("-regtest", "Enter regression test mode, which uses a special chain in which blocks can be solved instantly. "
2122
"This is intended for regression testing tools and app development.", true, OptionsCategory::CHAINPARAMS);
2223
gArgs.AddArg("-testnet", "Use the test chain", false, OptionsCategory::CHAINPARAMS);
23-
gArgs.AddArg("-vbparams=deployment:start:end", "Use given start/end times for specified version bits deployment (regtest-only)", true, OptionsCategory::CHAINPARAMS);
24+
gArgs.AddArg("-vbparams=deployment:start:end", "Use given start/end times for specified version bits deployment (regtest or custom only)", true, OptionsCategory::CHAINPARAMS);
25+
gArgs.AddArg("-seednode=<ip>", "Use specified node as seed node. This option can be specified multiple times to connect to multiple nodes. (custom only)", true, OptionsCategory::CHAINPARAMS);
2426
}
2527

2628
static std::unique_ptr<CBaseChainParams> globalChainBaseParams;
@@ -39,8 +41,8 @@ std::unique_ptr<CBaseChainParams> CreateBaseChainParams(const std::string& chain
3941
return MakeUnique<CBaseChainParams>("testnet3", 18332);
4042
else if (chain == CBaseChainParams::REGTEST)
4143
return MakeUnique<CBaseChainParams>("regtest", 18443);
42-
else
43-
throw std::runtime_error(strprintf("%s: Unknown chain %s.", __func__, chain));
44+
45+
return MakeUnique<CBaseChainParams>(chain, 18553);
4446
}
4547

4648
void SelectBaseParams(const std::string& chain)

src/init.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ void SetupServerArgs()
349349
// Hidden Options
350350
std::vector<std::string> hidden_args = {"-rpcssl", "-benchmark", "-h", "-help", "-socks", "-tor", "-debugnet", "-whitelistalwaysrelay",
351351
"-prematurewitness", "-walletprematurewitness", "-promiscuousmempoolflags", "-blockminsize", "-dbcrashratio", "-forcecompactdb", "-usehd",
352+
"-con_fpowallowmindifficultyblocks", "-con_fpownoretargeting", "-con_nsubsidyhalvinginterval", "-con_bip16exception", "-con_bip34height", "-con_bip65height", "-con_bip66height", "-con_npowtargettimespan", "-con_npowtargetspacing", "-con_nrulechangeactivationthreshold", "-con_nminerconfirmationwindow", "-con_powlimit", "-con_bip34hash", "-con_nminimumchainwork", "-con_defaultassumevalid", "-npruneafterheight", "-fdefaultconsistencychecks", "-fmineblocksondemand", "-bech32_hrp", "-fallback_fee_enabled", "-pubkeyprefix", "-scriptprefix", "-secretprefix", "-extpubkeyprefix", "-extprvkeyprefix", "-pchmessagestart",
352353
// GUI args. These will be overwritten by SetupUIArgs for the GUI
353354
"-allowselfsignedrootcertificates", "-choosedatadir", "-lang=<lang>", "-min", "-resetguisettings", "-rootcertificates=<file>", "-splash", "-uiplatform"};
354355

src/qt/bitcoin.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ int main(int argc, char *argv[])
654654
// - QSettings() will use the new application name after this, resulting in network-specific settings
655655
// - Needs to be done before createOptionsModel
656656

657-
// Check for -testnet or -regtest parameter (Params() calls are only valid after this clause)
657+
// Check for -chain, -testnet or -regtest parameter (Params() calls are only valid after this clause)
658658
try {
659659
node->selectParams(gArgs.GetChainName());
660660
} catch(std::exception &e) {
@@ -666,7 +666,7 @@ int main(int argc, char *argv[])
666666
PaymentServer::ipcParseCommandLine(*node, argc, argv);
667667
#endif
668668

669-
QScopedPointer<const NetworkStyle> networkStyle(NetworkStyle::instantiate(QString::fromStdString(Params().NetworkIDString())));
669+
QScopedPointer<const NetworkStyle> networkStyle(NetworkStyle::instantiate(Params().NetworkIDString()));
670670
assert(!networkStyle.isNull());
671671
// Allow for separate UI settings for testnets
672672
QApplication::setApplicationName(networkStyle->getAppName());

src/qt/guiutil.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ bool SetStartOnSystemStartup(bool fAutoStart)
562562
// Start client minimized
563563
QString strArgs = "-min";
564564
// Set -testnet /-regtest options
565-
strArgs += QString::fromStdString(strprintf(" -testnet=%d -regtest=%d", gArgs.GetBoolArg("-testnet", false), gArgs.GetBoolArg("-regtest", false)));
565+
strArgs += QString::fromStdString(strprintf(" -chain=%s", gArgs.GetChainName()));
566566

567567
#ifdef UNICODE
568568
boost::scoped_array<TCHAR> args(new TCHAR[strArgs.length() + 1]);
@@ -672,7 +672,7 @@ bool SetStartOnSystemStartup(bool fAutoStart)
672672
optionFile << "Name=Bitcoin\n";
673673
else
674674
optionFile << strprintf("Name=Bitcoin (%s)\n", chain);
675-
optionFile << "Exec=" << pszExePath << strprintf(" -min -testnet=%d -regtest=%d\n", gArgs.GetBoolArg("-testnet", false), gArgs.GetBoolArg("-regtest", false));
675+
optionFile << "Exec=" << pszExePath << strprintf(" -min -chain=%s\n", chain);
676676
optionFile << "Terminal=false\n";
677677
optionFile << "Hidden=false\n";
678678
optionFile.close();

src/qt/networkstyle.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,20 @@
66

77
#include <qt/guiconstants.h>
88

9+
#include <chainparamsbase.h>
10+
#include <tinyformat.h>
11+
912
#include <QApplication>
1013

1114
static const struct {
1215
const char *networkId;
1316
const char *appName;
1417
const int iconColorHueShift;
1518
const int iconColorSaturationReduction;
16-
const char *titleAddText;
1719
} network_styles[] = {
18-
{"main", QAPP_APP_NAME_DEFAULT, 0, 0, ""},
19-
{"test", QAPP_APP_NAME_TESTNET, 70, 30, QT_TRANSLATE_NOOP("SplashScreen", "[testnet]")},
20-
{"regtest", QAPP_APP_NAME_TESTNET, 160, 30, "[regtest]"}
20+
{"main", QAPP_APP_NAME_DEFAULT, 0, 0},
21+
{"test", QAPP_APP_NAME_TESTNET, 70, 30},
22+
{"regtest", QAPP_APP_NAME_TESTNET, 160, 30}
2123
};
2224
static const unsigned network_styles_count = sizeof(network_styles)/sizeof(*network_styles);
2325

@@ -75,8 +77,9 @@ NetworkStyle::NetworkStyle(const QString &_appName, const int iconColorHueShift,
7577
trayAndWindowIcon = QIcon(pixmap.scaled(QSize(256,256)));
7678
}
7779

78-
const NetworkStyle *NetworkStyle::instantiate(const QString &networkId)
80+
const NetworkStyle* NetworkStyle::instantiate(const std::string& networkId)
7981
{
82+
std::string titleAddText = networkId == CBaseChainParams::MAIN ? "" : strprintf("[%s]", networkId);
8083
for (unsigned x=0; x<network_styles_count; ++x)
8184
{
8285
if (networkId == network_styles[x].networkId)
@@ -85,8 +88,8 @@ const NetworkStyle *NetworkStyle::instantiate(const QString &networkId)
8588
network_styles[x].appName,
8689
network_styles[x].iconColorHueShift,
8790
network_styles[x].iconColorSaturationReduction,
88-
network_styles[x].titleAddText);
91+
titleAddText.c_str());
8992
}
9093
}
91-
return 0;
94+
return new NetworkStyle(strprintf("%s-%s", QAPP_APP_NAME_DEFAULT, networkId).c_str(), 250, 30, titleAddText.c_str());
9295
}

src/qt/networkstyle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class NetworkStyle
1414
{
1515
public:
1616
/** Get style associated with provided BIP70 network id, or 0 if not known */
17-
static const NetworkStyle *instantiate(const QString &networkId);
17+
static const NetworkStyle* instantiate(const std::string& networkId);
1818

1919
const QString &getAppName() const { return appName; }
2020
const QIcon &getAppIcon() const { return appIcon; }

src/txdb.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,11 @@ bool CBlockTreeDB::LoadBlockIndexGuts(const Consensus::Params& consensusParams,
274274
pindexNew->nStatus = diskindex.nStatus;
275275
pindexNew->nTx = diskindex.nTx;
276276

277-
if (!CheckProofOfWork(pindexNew->GetBlockHash(), pindexNew->nBits, consensusParams))
278-
return error("%s: CheckProofOfWork failed: %s", __func__, pindexNew->ToString());
279-
277+
const uint256 block_hash = pindexNew->GetBlockHash();
278+
if (!CheckProofOfWork(block_hash, pindexNew->nBits, consensusParams) &&
279+
block_hash != consensusParams.hashGenesisBlock) {
280+
return error("%s: CheckProofOfWork: %s, %s", __func__, block_hash.ToString(), pindexNew->ToString());
281+
}
280282
pcursor->Next();
281283
} else {
282284
return error("%s: failed to read value", __func__);

src/util.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -961,16 +961,18 @@ bool ArgsManager::ReadConfigFiles(std::string& error, bool ignore_invalid_keys)
961961

962962
std::string ArgsManager::GetChainName() const
963963
{
964-
bool fRegTest = ArgsManagerHelper::GetNetBoolArg(*this, "-regtest");
965-
bool fTestNet = ArgsManagerHelper::GetNetBoolArg(*this, "-testnet");
964+
const bool fRegTest = ArgsManagerHelper::GetNetBoolArg(*this, "-regtest");
965+
const bool fTestNet = ArgsManagerHelper::GetNetBoolArg(*this, "-testnet");
966+
const bool is_chain_arg_set = IsArgSet("-chain");
966967

967-
if (fTestNet && fRegTest)
968-
throw std::runtime_error("Invalid combination of -regtest and -testnet.");
968+
if ((int)is_chain_arg_set + (int)fRegTest + (int)fTestNet > 1) {
969+
throw std::runtime_error("Invalid combination of -regtest, -testnet and -chain. Can use at most one.");
970+
}
969971
if (fRegTest)
970972
return CBaseChainParams::REGTEST;
971973
if (fTestNet)
972974
return CBaseChainParams::TESTNET;
973-
return CBaseChainParams::MAIN;
975+
return GetArg("-chain", CBaseChainParams::MAIN);
974976
}
975977

976978
#ifndef WIN32

src/validation.cpp

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,8 +1091,11 @@ bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos, const Consensus:
10911091
}
10921092

10931093
// Check the header
1094-
if (!CheckProofOfWork(block.GetHash(), block.nBits, consensusParams))
1094+
const uint256 block_hash = block.GetHash();
1095+
if (!CheckProofOfWork(block_hash, block.nBits, consensusParams) &&
1096+
block_hash != consensusParams.hashGenesisBlock) {
10951097
return error("ReadBlockFromDisk: Errors in block header at %s", pos.ToString());
1098+
}
10961099

10971100
return true;
10981101
}
@@ -1810,6 +1813,18 @@ bool CChainState::ConnectBlock(const CBlock& block, CValidationState& state, CBl
18101813
assert(*pindex->phashBlock == block.GetHash());
18111814
int64_t nTimeStart = GetTimeMicros();
18121815

1816+
// verify that the view's current state corresponds to the previous block
1817+
const uint256 hashPrevBlock = pindex->pprev == nullptr ? uint256() : pindex->pprev->GetBlockHash();
1818+
assert(hashPrevBlock == view.GetBestBlock());
1819+
1820+
// Special case for the genesis block, skipping connection of its transactions
1821+
// (its coinbase is unspendable)
1822+
if (block.GetHash() == chainparams.GetConsensus().hashGenesisBlock) {
1823+
if (!fJustCheck)
1824+
view.SetBestBlock(pindex->GetBlockHash());
1825+
return true;
1826+
}
1827+
18131828
// Check it again in case a previous version let a bad block in
18141829
// NOTE: We don't currently (re-)invoke ContextualCheckBlock() or
18151830
// ContextualCheckBlockHeader() here. This means that if we add a new
@@ -1833,18 +1848,6 @@ bool CChainState::ConnectBlock(const CBlock& block, CValidationState& state, CBl
18331848
return error("%s: Consensus::CheckBlock: %s", __func__, FormatStateMessage(state));
18341849
}
18351850

1836-
// verify that the view's current state corresponds to the previous block
1837-
uint256 hashPrevBlock = pindex->pprev == nullptr ? uint256() : pindex->pprev->GetBlockHash();
1838-
assert(hashPrevBlock == view.GetBestBlock());
1839-
1840-
// Special case for the genesis block, skipping connection of its transactions
1841-
// (its coinbase is unspendable)
1842-
if (block.GetHash() == chainparams.GetConsensus().hashGenesisBlock) {
1843-
if (!fJustCheck)
1844-
view.SetBestBlock(pindex->GetBlockHash());
1845-
return true;
1846-
}
1847-
18481851
nBlocksTotal++;
18491852

18501853
bool fScriptChecks = true;
@@ -3498,8 +3501,9 @@ bool CChainState::AcceptBlock(const std::shared_ptr<const CBlock>& pblock, CVali
34983501
if (pindex->nChainWork < nMinimumChainWork) return true;
34993502
}
35003503

3501-
if (!CheckBlock(block, state, chainparams.GetConsensus()) ||
3502-
!ContextualCheckBlock(block, state, chainparams.GetConsensus(), pindex->pprev)) {
3504+
if (chainparams.GetConsensus().hashGenesisBlock != block.GetHash() &&
3505+
(!CheckBlock(block, state, chainparams.GetConsensus()) ||
3506+
!ContextualCheckBlock(block, state, chainparams.GetConsensus(), pindex->pprev))) {
35033507
if (state.IsInvalid() && !state.CorruptionPossible()) {
35043508
pindex->nStatus |= BLOCK_FAILED_VALID;
35053509
setDirtyBlockIndex.insert(pindex);

test/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ For instance, to attach to `self.node[1]` during a run:
169169
use the directory path to get the pid from the pid file:
170170

171171
```bash
172-
cat /tmp/user/1000/testo9vsdjo3/node1/regtest/bitcoind.pid
172+
cat /tmp/user/1000/testo9vsdjo3/node1/regtest2/bitcoind.pid
173173
gdb /home/example/bitcoind <pid>
174174
```
175175

0 commit comments

Comments
 (0)