-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(
iroh::downloader
): remove hash from providers
in two missed c…
…ases (#1584) ## Description We weren't removing the hash of a request that was scheduled, became ready but couldn't be executed. This caused getting the next hash for a provider to pop a hash no longer necessary. I added an invariant check for the provider map and it seems to be we missed a couple removals in #1480 so this fixes removal in cancellation as well ## Notes & open questions one small change, seemingly unrelated, is that the `debug_assert` now uses the debug version of the hash instead of display. This is because throughout the file we log the kind in debug, which in turn uses the debug impl for the hash. This difference made it a bit harder to follow the logs because the printed hash didn't match those in the rest of the logs. The change makes this consistent ## Change checklist - [x] Self-review. - [ ] Documentation updates if relevant. - [x] Tests if relevant.
- Loading branch information
1 parent
c1c7d15
commit 068f0bd
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters