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

fix(core-p2p): Ensure peer port is always an integer to avoid socket validation errors #3864

Merged
merged 2 commits into from
Jul 1, 2020

Conversation

bertiespell
Copy link
Contributor

Summary

Ensures that the port number used to construct the Peer class always uses an integer (instead of a string). This requires converting a string that may be set from config or environment variables.

This fixes the socket data validation issues. As per #3860

The change is implemented by using a Number() conversion on string config.

Checklist

  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

@codecov
Copy link

codecov bot commented Jul 1, 2020

Codecov Report

Merging #3864 into develop will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #3864   +/-   ##
========================================
  Coverage    92.09%   92.09%           
========================================
  Files          620      620           
  Lines        14845    14845           
  Branches      1847     1847           
========================================
  Hits         13671    13671           
  Misses         951      951           
  Partials       223      223           
Flag Coverage Δ
#functional 6.10% <0.00%> (ø)
#integration 9.56% <0.00%> (ø)
#unit 90.12% <100.00%> (ø)
Impacted Files Coverage Δ
...es/core-p2p/src/socket-server/utils/get-headers.ts 100.00% <ø> (ø)
packages/core-p2p/src/service-provider.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8a6be81...836c625. Read the comment docs.

@air1one air1one merged commit 4e7cca1 into develop Jul 1, 2020
@faustbrian faustbrian deleted the port-validation-fix branch September 22, 2021 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants