vulpemventures / go-elements

Go support for Liquid/Elements transactions
MIT License
27 stars 13 forks source link

`block` pkg: add Hash method #185

Closed louisinger closed 2 years ago

louisinger commented 2 years ago

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")

@tiero @sekulicd please review

tiero commented 2 years ago

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