Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rapide: fix: make unexpected blocks a retriable error
In 719b5e6 I changed `download.expand` to release the node lock before returning. This allows other workers to access the just expanded node while we walk up the chain ancestry. This mean that when we relock the node later to add it to our list of tasks, someone else may have downloaded some of the blocks already and thus they are not in the childrens slice and thus we wont add them to our list. This also solve the case where you give a Traversal that is not supported by the underlying protocol, in that case we want to kill the current download and retry deeper, while previously we would hard error on this and kill the worker.
- Loading branch information