Some types such as Assertions, Shards, etc. implement a hash method which is used as a key in the caches. Currently it is just a string representation of the type.
Replace the string representation with the cbor representation if possible.
You can use this code snippet:
var a *section.Assertion
encoding := new(bytes.Buffer)
if err := cbor.NewWriter(encoding).Marshal(a); err != nil {
//handle error
}
Some types such as Assertions, Shards, etc. implement a hash method which is used as a key in the caches. Currently it is just a string representation of the type. Replace the string representation with the cbor representation if possible. You can use this code snippet: