vacp2p / nim-libp2p

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

default `MultiAddress` param for `newStandardSwitch` does not raise #1056

Closed etan-status closed 3 months ago

etan-status commented 3 months ago

newStandardSwitch has an addrs param that defaults to a constant if not specified. The constant should always parse fine, so expect it as such, instead of having unpredictable exception behaviour.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 82.81%. Comparing base (ae13a0d) to head (cf477a5).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/status-im/nim-libp2p/pull/1056/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/1056?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 #1056 +/- ## ============================================ + Coverage 82.79% 82.81% +0.01% ============================================ Files 91 91 Lines 15749 15749 ============================================ + Hits 13040 13042 +2 + Misses 2709 2707 -2 ``` | [Files](https://app.codecov.io/gh/status-im/nim-libp2p/pull/1056?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im) | Coverage Δ | | |---|---|---| | [libp2p/builders.nim](https://app.codecov.io/gh/status-im/nim-libp2p/pull/1056?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im#diff-bGlicDJwL2J1aWxkZXJzLm5pbQ==) | `93.91% <100.00%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/status-im/nim-libp2p/pull/1056/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im)