diff --git a/src/init.cpp b/src/init.cpp index 0aa3c9b6cb..6be2511ae9 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -425,7 +425,7 @@ void SetupServerArgs(ArgsManager& argsman) hidden_args.emplace_back("-sysperms"); #endif argsman.AddArg("-txindex", strprintf("Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)", DEFAULT_TXINDEX), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); - argsman.AddArg("-trim_headers", strprintf("Trim old headers in memory, removing blocksigning and dynafed-related fields. Saves memory, but blocks us from serving blocks or headers to peers, and removes trimmed fields from some JSON RPC outputs. (default: false)"), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); + argsman.AddArg("-trim_headers", strprintf("Trim old headers in memory (by default older than 2 epochs), removing blocksigning and dynafed-related fields. Saves memory, but blocks us from serving blocks or headers to peers, and removes trimmed fields from some JSON RPC outputs. (default: false)"), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); argsman.AddArg("-blockfilterindex=", strprintf("Maintain an index of compact filters by block (default: %s, values: %s).", DEFAULT_BLOCKFILTERINDEX, ListBlockFilterTypes()) + " If is not supplied or if = 1, indexes for all known types are enabled.", diff --git a/src/txdb.cpp b/src/txdb.cpp index 0a08d68cfd..ae85840111 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -307,6 +307,9 @@ bool CBlockTreeDB::WritePAKList(const std::vector >& return Write(std::make_pair(DB_PAK, uint256S("1")), offline_list) && Write(std::make_pair(DB_PAK, uint256S("2")), online_list) && Write(std::make_pair(DB_PAK, uint256S("3")), reject); } +/** Note that we only get a conservative (lower) estimate of the max header height here, + * obtained by sampling the first 10,000 headers on disk (which are in random order) and + * taking the highest block we see. */ bool CBlockTreeDB::WalkBlockIndexGutsForMaxHeight(int* nHeight) { std::unique_ptr pcursor(NewIterator()); *nHeight = 0;