algorand / algorand/go-algorand

Potential bug in ledger fetcher

Ouverte
#3,527 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Team Carbon-11
Langage dominant
Go
Étoiles
1.4k
Forks
537
Merge moyen
1 j 6 h
PR mergées (30 j)
17

Description

### Subject of the issue

Exiting at https://github.com/algorand/go-algorand/blob/master/catchup/ledgerFetcher.go#L178 is wrong because `tarReader` might still contain buffered data. The current implementation of `tar.Reader` doesn't use buffering, but nothing in its contract says it doesn't. Particularly, its implementation might change in the future and it will become an issue.

The best solution, imo, is to not return anything in `util.WatchdogStreamReader.Reset()` since it's not necessary.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.