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

Transaction.encode() should be renamed encodeTxWith() #1847

Open
SergioDemianLerner opened this issue Aug 3, 2022 · 1 comment
Open

Transaction.encode() should be renamed encodeTxWith() #1847

SergioDemianLerner opened this issue Aug 3, 2022 · 1 comment

Comments

@SergioDemianLerner
Copy link
Contributor

The method encodes the transaction, not only the signature given in the arguments v,r and s. The name encode(v,r,s) suggests that what is encoded are the arguments.

@Vovchyk
Copy link
Contributor

Vovchyk commented Aug 10, 2022

hmm.. if Transaction.encode() was a static method, then yes we could consider v, r and s as the ones being encoded. But Transaction.encode() is an instance method, eg. same as String.substring(index). More over, it's a private one, so is not exposed outside. Personally, I don't see confusion here, but feel free to make a pr with the suggested change - I believe the impact is close to zero.

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

No branches or pull requests

2 participants