Skip to content
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): fix bug of method toString in BlockCapsule #5594

Merged

Conversation

317787106
Copy link
Contributor

What does this PR do?

  • fix bug of method toString in BlockCapsule

Why are these changes required?

This PR has been tested by:

  • Unit Tests
  • Manual Testing

Follow up

Extra details

@317787106 317787106 linked an issue Nov 21, 2023 that may be closed by this pull request
@317787106 317787106 changed the title feat(net):fix bug of method toString in BlockCapsule feat(net): fix bug of method toString in BlockCapsule Nov 21, 2023
@@ -314,7 +313,7 @@ public boolean hasWitnessSignature() {

@Override
public String toString() {
toStringBuff.setLength(0);
StringBuilder toStringBuff = new StringBuilder();
Copy link
Contributor

Choose a reason for hiding this comment

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

why not replace the origin field with StringBuffer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lurais toStringBuff is only used in toString() method, using local variable makes code easier to understand.

@halibobo1205 halibobo1205 added this to the GreatVoyage-v4.7.4 milestone Nov 24, 2023
@halibobo1205 halibobo1205 merged commit acfaac8 into tronprotocol:develop Dec 27, 2023
2 checks passed
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.

4 participants