application-research / autoretrieve

A server to make GraphSync data accessible on IPFS
22 stars 7 forks source link

feat: paid retrieval optional + bug fixes #126

Closed rvagg closed 1 year ago

rvagg commented 1 year ago

"paid-retrievals" config option, defaulting to "false" will turn on attempting to retrieve from deals that are non-free. Otherwise, retrieval deals that are not free will be filtered. NOTE this changes the default behaviour such that paid retrievals need to be opted into. This should make paych errors go away.

+Other bug fixes because I wrote a test for this and found some other things along the way!

codecov-commenter commented 1 year ago

Codecov Report

Base: 13.70% // Head: 20.63% // Increases project coverage by +6.93% :tada:

Coverage data is based on head (c9b80fe) compared to base (1d2d50a). Patch coverage: 82.35% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #126 +/- ## ========================================== + Coverage 13.70% 20.63% +6.93% ========================================== Files 16 16 Lines 2226 2234 +8 ========================================== + Hits 305 461 +156 + Misses 1905 1742 -163 - Partials 16 31 +15 ``` | [Impacted Files](https://codecov.io/gh/application-research/autoretrieve/pull/126?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=application-research) | Coverage Δ | | |---|---|---| | [config.go](https://codecov.io/gh/application-research/autoretrieve/pull/126/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=application-research#diff-Y29uZmlnLmdv) | `0.00% <0.00%> (ø)` | | | [filecoin/retriever.go](https://codecov.io/gh/application-research/autoretrieve/pull/126/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=application-research#diff-ZmlsZWNvaW4vcmV0cmlldmVyLmdv) | `37.17% <93.33%> (+37.17%)` | :arrow_up: | | [filecoin/retrieverevents.go](https://codecov.io/gh/application-research/autoretrieve/pull/126/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=application-research#diff-ZmlsZWNvaW4vcmV0cmlldmVyZXZlbnRzLmdv) | `16.41% <0.00%> (+16.41%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=application-research). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=application-research)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

rvagg commented 1 year ago

I realised I forgot to attach my tests to this cause it was a new file .. done now