Skip to content

Conversation

@317787106
Copy link
Contributor

What does this PR do?

  • supplement two disconnect reasons, including RelayService and shutdown node

Why are these changes required?

This PR has been tested by:

  • Unit Tests
  • Manual Testing

Follow up

Extra details

@317787106 317787106 linked an issue Aug 2, 2023 that may be closed by this pull request
@lvs007 lvs007 requested review from jwrct and xxo1shine August 3, 2023 03:44
@halibobo1205 halibobo1205 added this to the GreatVoyage-v4.7.3 milestone Aug 9, 2023
TOO_MANY_PEERS_WITH_SAME_IP = 0x22;
LIGHT_NODE_SYNC_FAIL = 0x23;
BELOW_THAN_ME = 0X24;
NOT_WITNESS = 0x25;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it compatible with older versions?

Copy link
Contributor Author

@317787106 317787106 Aug 11, 2023

Choose a reason for hiding this comment

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

All of the newly added unrecognized ReasonCode will be converted to ReasonCode UNKNOWN, and no exception will be thrown.

Copy link
Contributor

Choose a reason for hiding this comment

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

  1. It is recommended to make it more perfect, whether each of these merged cases defines a reason, and there are some unknown scenarios
    case NO_SUCH_MESSAGE:
    case MESSAGE_WITH_WRONG_LENGTH:
    case BAD_MESSAGE:
    code = Protocol.ReasonCode.BAD_PROTOCOL;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@wubin01 there is no MESSAGE_WITH_WRONG_LENGTH really. But there is NO_SUCH_MESSAGE. Do you means add NO_SUCH_MESSAGE in Protocol.ReasonCode?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have added new ReasonCode NO_SUCH_MESSAGE in proto.

@317787106 317787106 merged commit b9ab07a into tronprotocol:develop Sep 5, 2023
@317787106 317787106 linked an issue Sep 13, 2023 that may be closed by this pull request
Copy link

@Nidacoke Nidacoke left a comment

Choose a reason for hiding this comment

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

Everyone have any idea for more updates.

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.

TIP-592: Supplement Disconnect Reasons in Java-tron Supplement Disconnect Reasons in Java-tron

5 participants