vacp2p / nim-libp2p

libp2p implementation in Nim
https://vacp2p.github.io/nim-libp2p/docs/
MIT License
242 stars 52 forks source link

`{.async: (raises).}` for `MultistreamSelect` #1066

Closed etan-status closed 3 months ago

etan-status commented 3 months ago

Annotate MultistreamSelect with {.async: (raises).} and ensure that handle returns a MultiStreamError instead of CatchableError in the "invalid first message" case.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 80.73394% with 21 lines in your changes are missing coverage. Please review.

Project coverage is 82.50%. Comparing base (08a48fa) to head (a24ead9).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/status-im/nim-libp2p/pull/1066/graphs/tree.svg?width=650&height=150&src=pr&token=UR5JRQ249W&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im)](https://app.codecov.io/gh/status-im/nim-libp2p/pull/1066?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im) ```diff @@ Coverage Diff @@ ## unstable #1066 +/- ## ============================================ - Coverage 82.56% 82.50% -0.06% ============================================ Files 91 91 Lines 15814 15849 +35 ============================================ + Hits 13057 13077 +20 - Misses 2757 2772 +15 ``` | [Files](https://app.codecov.io/gh/status-im/nim-libp2p/pull/1066?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im) | Coverage Δ | | |---|---|---| | [libp2p/protocols/protocol.nim](https://app.codecov.io/gh/status-im/nim-libp2p/pull/1066?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im#diff-bGlicDJwL3Byb3RvY29scy9wcm90b2NvbC5uaW0=) | `100.00% <100.00%> (ø)` | | | [libp2p/protocols/connectivity/relay/relay.nim](https://app.codecov.io/gh/status-im/nim-libp2p/pull/1066?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im#diff-bGlicDJwL3Byb3RvY29scy9jb25uZWN0aXZpdHkvcmVsYXkvcmVsYXkubmlt) | `81.76% <81.81%> (+0.41%)` | :arrow_up: | | [libp2p/protocols/pubsub/gossipsub.nim](https://app.codecov.io/gh/status-im/nim-libp2p/pull/1066?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im#diff-bGlicDJwL3Byb3RvY29scy9wdWJzdWIvZ29zc2lwc3ViLm5pbQ==) | `87.01% <81.81%> (-0.03%)` | :arrow_down: | | [libp2p/protocols/rendezvous.nim](https://app.codecov.io/gh/status-im/nim-libp2p/pull/1066?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im#diff-bGlicDJwL3Byb3RvY29scy9yZW5kZXp2b3VzLm5pbQ==) | `76.73% <81.81%> (ø)` | | | [libp2p/multistream.nim](https://app.codecov.io/gh/status-im/nim-libp2p/pull/1066?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im#diff-bGlicDJwL211bHRpc3RyZWFtLm5pbQ==) | `87.30% <76.92%> (-6.41%)` | :arrow_down: | ... and [4 files with indirect coverage changes](https://app.codecov.io/gh/status-im/nim-libp2p/pull/1066/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im)
etan-status commented 3 months ago