diff options
author | Jon Atack <jon@atack.com> | 2022-06-12 12:38:38 +0200 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2022-07-22 12:44:16 +0200 |
commit | 99e8ec8721a52cd08bdca31f6e926c9c1ce281fb (patch) | |
tree | 4a1359f343a4beda25c0ac320f38e1d87de00bd2 | |
parent | 14aeece462b149eaf0d28a37d55cc169df99b2cb (diff) | |
download | bitcoin-99e8ec8721a52cd08bdca31f6e926c9c1ce281fb.tar.xz |
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.
-rw-r--r-- | src/chain.h | 11 | ||||
-rw-r--r-- | src/test/fuzz/chain.cpp | 1 |
2 files changed, 1 insertions, 11 deletions
diff --git a/src/chain.h b/src/chain.h index 1a499b07cc..251471befb 100644 --- a/src/chain.h +++ b/src/chain.h @@ -415,16 +415,7 @@ public: return block.GetHash(); } - - std::string ToString() const - { - std::string str = "CDiskBlockIndex("; - str += CBlockIndex::ToString(); - str += strprintf("\n hashBlock=%s, hashPrev=%s)", - GetBlockHash().ToString(), - hashPrev.ToString()); - return str; - } + std::string ToString() = delete; }; /** An in-memory indexed chain of blocks. */ diff --git a/src/test/fuzz/chain.cpp b/src/test/fuzz/chain.cpp index 8c0ed32d51..1d6b5f30db 100644 --- a/src/test/fuzz/chain.cpp +++ b/src/test/fuzz/chain.cpp @@ -31,7 +31,6 @@ FUZZ_TARGET(chain) (void)disk_block_index->GetUndoPos(); (void)disk_block_index->HaveTxsDownloaded(); (void)disk_block_index->IsValid(); - (void)disk_block_index->ToString(); } const CBlockHeader block_header = disk_block_index->GetBlockHeader(); |