aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2014-11-27 13:17:12 +0100
committerWladimir J. van der Laan <[email protected]>2014-11-27 13:26:36 +0100
commit2adce1f71600881f69ba44a4d847ade5d7066f7e (patch)
tree885f9b1400533511b66abbe5a90e9fbf99ce1068 /src/init.cpp
parentMerge pull request #5384 (diff)
parentRemove -printblock, -printblocktree, and -printblockindex (diff)
downloaddiscoin-2adce1f71600881f69ba44a4d847ade5d7066f7e.tar.xz
discoin-2adce1f71600881f69ba44a4d847ade5d7066f7e.zip
Merge pull request #5385
57be955 Remove -printblock, -printblocktree, and -printblockindex (Pieter Wuille)
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 63e72c66d..7b6ebb1b3 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -330,8 +330,6 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += " -printtoconsole " + _("Send trace/debug info to console instead of debug.log file") + "\n";
if (GetBoolArg("-help-debug", false))
{
- strUsage += " -printblock=<hash> " + _("Print block on startup, if found in block index") + "\n";
- strUsage += " -printblocktree " + strprintf(_("Print block tree on startup (default: %u)"), 0) + "\n";
strUsage += " -printpriority " + strprintf(_("Log transaction priority and fee per kB when mining blocks (default: %u)"), 0) + "\n";
strUsage += " -privdb " + strprintf(_("Sets the DB_PRIVATE flag in the wallet db environment (default: %u)"), 1) + "\n";
strUsage += " -regtest " + _("Enter regression test mode, which uses a special chain in which blocks can be solved instantly.") + "\n";
@@ -1048,34 +1046,6 @@ bool AppInit2(boost::thread_group& threadGroup)
}
LogPrintf(" block index %15dms\n", GetTimeMillis() - nStart);
- if (GetBoolArg("-printblockindex", false) || GetBoolArg("-printblocktree", false))
- {
- PrintBlockTree();
- return false;
- }
-
- if (mapArgs.count("-printblock"))
- {
- string strMatch = mapArgs["-printblock"];
- int nFound = 0;
- for (BlockMap::iterator mi = mapBlockIndex.begin(); mi != mapBlockIndex.end(); ++mi)
- {
- uint256 hash = (*mi).first;
- if (boost::algorithm::starts_with(hash.ToString(), strMatch))
- {
- CBlockIndex* pindex = (*mi).second;
- CBlock block;
- ReadBlockFromDisk(block, pindex);
- block.BuildMerkleTree();
- LogPrintf("%s\n", block.ToString());
- nFound++;
- }
- }
- if (nFound == 0)
- LogPrintf("No blocks matching %s were found\n", strMatch);
- return false;
- }
-
boost::filesystem::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME;
CAutoFile est_filein(fopen(est_path.string().c_str(), "rb"), SER_DISK, CLIENT_VERSION);
// Allowed to fail as this file IS missing on first startup.