Closed veshij closed 5 months ago
I mentioned the short circuiting in https://github.com/anacrolix/torrent/issues/897#issuecomment-1931141820.
I believe it's correct to return false for that case. I don't think it will be faster (or correct) to move the other stuff around.
If I understand correctly we should stop processing tree items once MaxUnverifiedBytes limit is reached. Existing implementation still goes through the whole tree resolving pointer to the torrent and calling t.IgnorePiece(_i.key.Index) for each piece.
while here moving storage check at the very end since it's quite unlikely it'll return False compared to MaxUnverifiedBytes or t.IgnorePiece().