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 2022-06-12 12:38:38 +02:00
parent 14aeece462
commit 99e8ec8721
2 changed files with 1 additions and 11 deletions

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. */

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();