feat(net):supplement disconnect reasons by 317787106 · Pull Request #5392 · tronprotocol/java-tron
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
| TOO_MANY_PEERS_WITH_SAME_IP = 0x22; | ||
| LIGHT_NODE_SYNC_FAIL = 0x23; | ||
| BELOW_THAN_ME = 0X24; | ||
| NOT_WITNESS = 0x25; |
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?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 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;
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?
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.
jiangyuanshu added 4 commits
August 30, 2023 15:41Choose 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters