Skip to content

Commit b9b7f65

Browse files
gwillendelta1
andcommitted
Apply suggestions from code review
Co-authored-by: Byron Hambly <[email protected]>
1 parent 29345e9 commit b9b7f65

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/rest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ static bool rest_headers(const std::any& context,
225225
CBlockHeader tmp;
226226
ReadBlockHeaderFromDisk(tmp, pindex, Params().GetConsensus());
227227
ssHeader << tmp;
228-
229228
} else {
230229
ssHeader << pindex->GetBlockHeader();
231230
}
@@ -247,7 +246,8 @@ static bool rest_headers(const std::any& context,
247246

248247
} else {
249248
ssHeader << pindex->GetBlockHeader();
250-
} }
249+
}
250+
}
251251

252252
std::string strHex = HexStr(ssHeader) + "\n";
253253
req->WriteHeader("Content-Type", "text/plain");

src/txdb.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ bool CBlockTreeDB::WalkBlockIndexGutsForMaxHeight(int* nHeight) {
318318
if (pcursor->GetKey(key) && key.first == DB_BLOCK_INDEX) {
319319
i++;
320320
if (i > 10'000) {
321-
// Under the (accurate) assumption hat the headers on disk are effectively in random height order,
321+
// Under the (accurate) assumption that the headers on disk are effectively in random height order,
322322
// we have a good-enough (conservative) estimate of the max height very quickly, and don't need to
323323
// waste more time. Shortcutting like this will cause us to keep a few extra headers, which is fine.
324324
break;

src/validation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4141,7 +4141,7 @@ bool BlockManager::LoadBlockIndex(
41414141
if (fTrimHeaders) {
41424142
int max_height = 0;
41434143
if (!blocktree.WalkBlockIndexGutsForMaxHeight(&max_height)) {
4144-
LogPrintf("LoadBlockIndex: Somehow failed to WalkBlockIndexGutsForMaxHeight.\n");
4144+
LogPrintf("LoadBlockIndex: Failed to WalkBlockIndexGutsForMaxHeight.\n");
41454145
return false;
41464146
}
41474147

0 commit comments

Comments
 (0)