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

Peer address parsing refactoring #1551

Merged
merged 9 commits into from
Dec 3, 2024

Conversation

nickeskov
Copy link
Member

No description provided.

Add check for IP address parsing failure.
Improved 'TestNewPeerInfoFromString'.
Add hostname IP resolving.
@nickeskov nickeskov added bug Something isn't working refactoring Changes or request about refactoring labels Nov 29, 2024
pkg/proto/proto.go Dismissed Show dismissed Hide dismissed
pkg/proto/proto.go Outdated Show resolved Hide resolved
pkg/proto/proto_test.go Outdated Show resolved Hide resolved
alexeykiselev and others added 5 commits December 2, 2024 13:12
- Now it returns ipV4 address exactly in ipV4 form.
- Fixed bug with skipping address for chesk after ipV6 removal.
- Fixed bug with duplication of ipV4 address when resolving 'localhost'.
@nickeskov nickeskov added the enhancement New feature or request label Dec 2, 2024
@alexeykiselev alexeykiselev merged commit 0a630ca into master Dec 3, 2024
16 of 17 checks passed
@alexeykiselev alexeykiselev deleted the peer-address-parsing-refactoring branch December 3, 2024 10:10
esuwu pushed a commit that referenced this pull request Dec 4, 2024
* Refactor and fix 'NewPeerInfoFromString'

Add check for IP address parsing failure.
Improved 'TestNewPeerInfoFromString'.

* Improve 'NewPeerInfoFromString'

Add hostname IP resolving.

* Simplified 'NewTCPAddrFromString'

* Refactoring and bugfix of 'resolveHostToIPv4'

- Now it returns ipV4 address exactly in ipV4 form.
- Fixed bug with skipping address for chesk after ipV6 removal.
- Fixed bug with duplication of ipV4 address when resolving 'localhost'.

* Optimized a bit 'filterToIPV4'.

* Create 'NewPeerInfosFromString' function.

* Use 'NewPeerInfosFromString' for resolving 'host:port' records by '-peers' CLI parameter.

* Fix 'TestNewPeerInfoFromString' test.

---------

Co-authored-by: Alexey Kiselev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request refactoring Changes or request about refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants