hashgraph / hedera-sdk-java

Hedera™ Hashgraph SDK for Java
https://docs.hedera.com/guides/docs/sdks
Apache License 2.0
229 stars 117 forks source link

ServiceEndpoint port gets overwritten #2098

Open jbair06 opened 8 hours ago

jbair06 commented 8 hours ago

Description

When I create a NodeUpdate or NodeCreate transaction and set the proper endpoints with the proper ports, then serialize and deserialize the transaction, the endpoint ports are now different. ServiceEndpoint.fromProtobuf checks for the port to be 0 or 50111, then sets it to 50211 if so.

Steps to reproduce

Remove the check and overwriting of the port when deserializing the endpoints. 50111 is a valid port for gossip Endpoints.

Additional context

No response

Hedera network

No response

Version

2.44.0

Operating system

None

ElijahLynn commented 7 hours ago

https://github.com/hashgraph/hedera-sdk-java/blob/9b2617d5f8f55c75ac21713cfdf680334c3c59a5/sdk/src/main/java/com/hedera/hashgraph/sdk/Endpoint.java#L56-L58