Remove unused SetTip(nullptr) code

This commit is contained in:
MacroFake
2022-04-29 09:41:09 +02:00
parent 816ca01650
commit faab8dceb3
5 changed files with 15 additions and 16 deletions

View File

@@ -18,11 +18,9 @@ std::string CBlockIndex::ToString() const
pprev, nHeight, hashMerkleRoot.ToString(), GetBlockHash().ToString());
}
void CChain::SetTip(CBlockIndex *pindex) {
if (pindex == nullptr) {
vChain.clear();
return;
}
void CChain::SetTip(CBlockIndex& block)
{
CBlockIndex* pindex = █
vChain.resize(pindex->nHeight + 1);
while (pindex && vChain[pindex->nHeight] != pindex) {
vChain[pindex->nHeight] = pindex;