Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{.async: (raises).} annotations for protocols/secure #1059

Merged
merged 2 commits into from
Mar 7, 2024

Conversation

etan-status
Copy link
Contributor

Extend files in libp2p/protocols/secure with {.async: (raises).} annotations and also apply some minor cleanups such as removing unnecessary result usage, using min template and reordering secio variables to be closer to their usage, changing var to let etc.

This is somewhat intertwined due to method handshake* which spans across all three files and must be updated in all files simultaneously.

Extend files in `libp2p/protocols/secure` with `{.async: (raises).}`
annotations and also apply some minor cleanups such as removing
unnecessary `result` usage, using `min` template and reordering `secio`
variables to be closer to their usage, changing `var` to `let` etc.

This is somewhat intertwined due to `method handshake*` which spans
across all three files and must be updated in all files simultaneously.
secrets: Secret,
order: int,
remotePubKey: PublicKey): SecioConn
{.raises: [LPError].} =
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it doesn't actually raise, so use default {.raises: [].} from top level {.push.}.

Copy link

codecov bot commented Mar 6, 2024

Codecov Report

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

Project coverage is 82.56%. Comparing base (ca01ee0) to head (a4c58d7).
Report is 1 commits behind head on unstable.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##           unstable    #1059      +/-   ##
============================================
- Coverage     82.81%   82.56%   -0.25%     
============================================
  Files            91       91              
  Lines         15750    15814      +64     
============================================
+ Hits          13043    13057      +14     
- Misses         2707     2757      +50     
Files Coverage Δ
libp2p/protocols/secure/secure.nim 73.98% <100.00%> (+1.85%) ⬆️
libp2p/protocols/secure/noise.nim 87.31% <60.78%> (-2.78%) ⬇️
libp2p/protocols/secure/secio.nim 3.38% <0.00%> (-0.46%) ⬇️

... and 4 files with indirect coverage changes

arnetheduck
arnetheduck previously approved these changes Mar 7, 2024
@etan-status etan-status merged commit 08a48fa into unstable Mar 7, 2024
10 of 11 checks passed
@etan-status etan-status deleted the dev/etan/ex-secure branch March 7, 2024 11:22
@etan-status
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants