fix(net): fix the unclear reason codes returned in disconnection messages by jwrct · Pull Request #6394 · tronprotocol/java-tron

@jwrct

What does this PR do?
Closes #5989
Why are these changes required?

This PR has been tested by:

  • Unit Tests
  • Manual Testing

Follow up

Extra details

@jwrct

xxo1shine

@jwrct jwrct changed the base branch from develop to release_v4.8.1

July 9, 2025 03:58

@jwrct jwrct changed the title fix(net): fix for ambiguous reason code in disconnect messages fix(net): fix the unclear reason codes returned in disconnection messages

Jul 9, 2025

Sunny6889

bladehan1

kuny0707

halibobo1205

barbatos2011

waynercheung

BlockCapsule.BlockId hid = ChainBaseManager.getChainBaseManager().getHeadBlockId();
Protocol.HelloMessage.BlockId hBlockId = Protocol.HelloMessage.BlockId.newBuilder()
.setHash(ByteString.copyFrom(new byte[0]))
Protocol.HelloMessage.BlockId okBlockId = Protocol.HelloMessage.BlockId.newBuilder()

Choose a reason for hiding this comment

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

what about using "validBLockId" instead of "okBlockId"?

Choose a reason for hiding this comment

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

Test case adjustment only.

lvs0075