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

sha3 256 hash doesn't match block explorer #10

Open
jinj opened this issue Jul 24, 2022 · 1 comment
Open

sha3 256 hash doesn't match block explorer #10

jinj opened this issue Jul 24, 2022 · 1 comment

Comments

@jinj
Copy link

jinj commented Jul 24, 2022

I am trying to calculate tx hash as following:

bytes = utils.SerializeTransaction(&transferTx)
hash := sha3.Sum256(bytes)

But the hash doesn't match what I found on https://explorer.nemtool.com/

Can you help on this?

Thank you for the sdk and your help.

Juping

@jinj
Copy link
Author

jinj commented Jul 25, 2022

I also tried to add signature to byte array, but the result still doesn't match with online explorer:

bytes = utils.SerializeTransaction(&transferTx)

signature, _ := hex.DecodeString(transferTx.Signature)
bytes = append(bytes, signature...)

hash := sha3.Sum256(bytes)

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

1 participant