Skip to content

Conversation

@louisinger
Copy link
Collaborator

@louisinger louisinger commented Nov 29, 2021

This PR adds a forHash bool parameter to the SerializeHeader method and thus generate the serialized block header buffer according to our need (for "reading" or for "hash")

  • it lets to return the block's ID using the Header.GetHash method.
  • tested in hash_hash.go (with Liquid & Nigiri block)

@tiero @sekulicd please review

@tiero
Copy link
Member

tiero commented Nov 29, 2021

Wouldn't be better, API wise, to have two separated methods, each with a specific purpose explicit in the name, instead of a boolean parameter

@louisinger louisinger requested a review from tiero November 30, 2021 12:32
@tiero tiero requested a review from sekulicd November 30, 2021 12:54
@tiero tiero changed the title block pkg: add GetHash method block pkg: add Hash method Nov 30, 2021
@tiero tiero merged commit 36be5ff into vulpemventures:master Nov 30, 2021
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.

2 participants