diff --git a/src/rest.cpp b/src/rest.cpp index 65888f95a0..519412e228 100644 --- a/src/rest.cpp +++ b/src/rest.cpp @@ -225,7 +225,6 @@ static bool rest_headers(const std::any& context, CBlockHeader tmp; ReadBlockHeaderFromDisk(tmp, pindex, Params().GetConsensus()); ssHeader << tmp; - } else { ssHeader << pindex->GetBlockHeader(); } @@ -247,7 +246,8 @@ static bool rest_headers(const std::any& context, } else { ssHeader << pindex->GetBlockHeader(); - } } + } + } std::string strHex = HexStr(ssHeader) + "\n"; req->WriteHeader("Content-Type", "text/plain"); diff --git a/src/txdb.cpp b/src/txdb.cpp index 398c515ca3..f5266c1889 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -318,7 +318,7 @@ bool CBlockTreeDB::WalkBlockIndexGutsForMaxHeight(int* nHeight) { if (pcursor->GetKey(key) && key.first == DB_BLOCK_INDEX) { i++; if (i > 10'000) { - // Under the (accurate) assumption hat the headers on disk are effectively in random height order, + // Under the (accurate) assumption that the headers on disk are effectively in random height order, // we have a good-enough (conservative) estimate of the max height very quickly, and don't need to // waste more time. Shortcutting like this will cause us to keep a few extra headers, which is fine. break; diff --git a/src/validation.cpp b/src/validation.cpp index 21c4fd5521..d11b3e0d2d 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -4141,7 +4141,7 @@ bool BlockManager::LoadBlockIndex( if (fTrimHeaders) { int max_height = 0; if (!blocktree.WalkBlockIndexGutsForMaxHeight(&max_height)) { - LogPrintf("LoadBlockIndex: Somehow failed to WalkBlockIndexGutsForMaxHeight.\n"); + LogPrintf("LoadBlockIndex: Failed to WalkBlockIndexGutsForMaxHeight.\n"); return false; }