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

add magic parameter overloads to GetHashData and Sign #1902

Merged
merged 4 commits into from
Sep 6, 2020
Merged

add magic parameter overloads to GetHashData and Sign #1902

merged 4 commits into from
Sep 6, 2020

Conversation

devhawk
Copy link
Contributor

@devhawk devhawk commented Sep 3, 2020

fixes #1900

Once this is merged, will need to add an overload to RpcClient TransactionManager.Sign[Async] that takes an explicit Magic uint parameter and calls the explicit magic overload of IVerifiable.Sign extension method (which calls explicit magic overload of IVerifiable.GetHashData)

@erikzhang
Copy link
Member

But GetHashData() is also used to generate hashes.

shargon
shargon previously approved these changes Sep 3, 2020
@shargon
Copy link
Member

shargon commented Sep 3, 2020

But GetHashData() is also used to generate hashes.

By default it will work as before

@devhawk
Copy link
Contributor Author

devhawk commented Sep 3, 2020

But GetHashData() is also used to generate hashes.

By default it will work as before

Yes. it's designed that way on purpose.

@devhawk
Copy link
Contributor Author

devhawk commented Sep 3, 2020

FYI, I'm going to also add a CalculateHash helper that takes an explicit magic parameter. Hold off on merging for now

@devhawk
Copy link
Contributor Author

devhawk commented Sep 3, 2020

I added a CalculateHash helper extension method to match GetHashData and Sign.

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.

Including Magic in hash makes RpcClient unusable for multiple blockchains
3 participants