Merge pull request #2644 from sipa/constfindblock

Make FindBlockByHeight constant-time
This commit is contained in:
Jeff Garzik
2013-05-30 08:06:44 -07:00
5 changed files with 36 additions and 51 deletions

View File

@@ -779,7 +779,7 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate)
if (AddToWalletIfInvolvingMe(tx.GetHash(), tx, &block, fUpdate))
ret++;
}
pindex = pindex->pnext;
pindex = pindex->GetNextInMainChain();
}
}
return ret;