Skip to content

Commit 99e8ec8

Browse files
committed
CDiskBlockIndex: remove unused ToString() class member
and mark its inherited CBlockIndex#ToString public interface member as deleted, to disallow calling it in the derived CDiskBlockIndex class.
1 parent 14aeece commit 99e8ec8

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

src/chain.h

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -415,16 +415,7 @@ class CDiskBlockIndex : public CBlockIndex
415415
return block.GetHash();
416416
}
417417

418-
419-
std::string ToString() const
420-
{
421-
std::string str = "CDiskBlockIndex(";
422-
str += CBlockIndex::ToString();
423-
str += strprintf("\n hashBlock=%s, hashPrev=%s)",
424-
GetBlockHash().ToString(),
425-
hashPrev.ToString());
426-
return str;
427-
}
418+
std::string ToString() = delete;
428419
};
429420

430421
/** An in-memory indexed chain of blocks. */

src/test/fuzz/chain.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ FUZZ_TARGET(chain)
3131
(void)disk_block_index->GetUndoPos();
3232
(void)disk_block_index->HaveTxsDownloaded();
3333
(void)disk_block_index->IsValid();
34-
(void)disk_block_index->ToString();
3534
}
3635

3736
const CBlockHeader block_header = disk_block_index->GetBlockHeader();

0 commit comments

Comments
 (0)