feat(net):supplement disconnect reasons by 317787106 · Pull Request #5392 · tronprotocol/java-tron

@317787106

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

halibobo1205

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.

  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;

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.

jwrct

jiangyuanshu added 4 commits

August 30, 2023 15:41

xxo1shine

Nidacoke

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.