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 crawler port field type inconsistency #5029

Open
mDuo13 opened this issue May 28, 2024 · 1 comment
Open

Peer crawler port field type inconsistency #5029

mDuo13 opened this issue May 28, 2024 · 1 comment
Assignees

Comments

@mDuo13
Copy link
Collaborator

mDuo13 commented May 28, 2024

Issue Description

The "Peer Crawler" special API method reports the port of peers as either an integer or a string depending on if the connection is inbound/outbound. This was probably an oversight in the original PR, and the field should be consistently the same type.

Steps to Reproduce

Call the peer crawler on a server that has both incoming and outgoing peers and check the response.

Expected Result

The port fields in the overlay.active[] array members should all be the same type, probably Number. Port numbers should always fit in any reasonable primitive that JSON numbers can be deserialized into.

Solution

Always make port a Number type. Note, this is (kind of) an API change, but to a special peer-port-API method and not to the standard API, so API versioning concerns do not apply.

Environment

rippled 1.2.1 through 2.1.x

Related issues

@intelliot
Copy link
Collaborator

Note, this is (kind of) an API change, but to a special peer-port-API method and not to the standard API, so API versioning concerns do not apply.

Agreed. Let's make sure it gets at least a mention in the release notes though.

@intelliot intelliot added this to the 2.3.0 (August 2024) milestone May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🏗 In progress
Development

No branches or pull requests

3 participants