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.
This commit is contained in:
Jon Atack committed 2022-07-22 12:44:16 +02:00
1 parent 14aeece462
commit 99e8ec8721
2 files changed
+1 -11

No files matched your search

+1 -10
View File
@@ -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. */
-1
View File
@@ -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();