Closed ffranr closed 1 year ago
This PR adds a MarshalJSON() method to chainhash.Hash. As a result, when serializing structures as JSON, a chain hash will be represented as its String() value.
MarshalJSON()
chainhash.Hash
String()
This change simplifies the JSON serialization of block and block header.
This PR adds a
MarshalJSON()
method tochainhash.Hash
. As a result, when serializing structures as JSON, a chain hash will be represented as itsString()
value.This change simplifies the JSON serialization of block and block header.