-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(net): add column codeVersion to HelloMessage #5584
feat(net): add column codeVersion to HelloMessage #5584
Conversation
builder.append("address:") | ||
.append(StringUtil.encode58Check(address.toByteArray())).append("\n"); | ||
} | ||
|
||
ByteString signature = helloMessage.getSignature(); | ||
if (signature != null && !signature.isEmpty()) { | ||
if (!signature.isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this field has some relationship with the codeVersion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this field has some relationship with the codeVersion?
No, only code optimization.
builder.append("signature:") | ||
.append(signature.toByteArray().length).append("\n"); | ||
} | ||
|
||
ByteString codeVersion = helloMessage.getCodeVersion(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this codeVersion be null when received a HelloMessage from a node with previous version ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every column in proto has default value. codeVersion
has default value byte[0]
, not null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix and push through Tron Project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -99,6 +100,9 @@ public void testOkHelloMessage() | |||
Node node = new Node(NetUtil.getNodeId(), a1.getAddress().getHostAddress(), null, a1.getPort()); | |||
HelloMessage helloMessage = new HelloMessage(node, System.currentTimeMillis(), | |||
ChainBaseManager.getChainBaseManager()); | |||
|
|||
Assert.assertEquals(Version.getVersion(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
./ |
ok |
What does this PR do?
Why are these changes required?
This PR has been tested by:
Follow up
Extra details