The Wayback Machine - https://web.archive.org/web/20210731063645/https://github.com/iotexproject/iotex-core/issues/2749
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

use Address() API to simplify code #2749

Open
dustinxie opened this issue Jul 29, 2021 · 0 comments
Open

use Address() API to simplify code #2749

dustinxie opened this issue Jul 29, 2021 · 0 comments

Comments

@dustinxie
Copy link
Contributor

@dustinxie dustinxie commented Jul 29, 2021

What would you like to be added:
replace

pubKey := prvKey.PublicKey()
addr, _ := address.FromBytes(pubKey.Hash())

with

addr := pubKey.Address()

Why is this needed:

  1. the latest go-pkgs added Address() API to directly output the Address object given the public key
  2. more concise code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant