Skip to content

add magic parameter overloads to GetHashData and Sign#1902

Merged
erikzhang merged 4 commits intoneo-project:masterfrom
devhawk:devhawk/fix-magic
Sep 6, 2020
Merged

add magic parameter overloads to GetHashData and Sign#1902
erikzhang merged 4 commits intoneo-project:masterfrom
devhawk:devhawk/fix-magic

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