Commit 613bc394 authored by Sietse Ringers's avatar Sietse Ringers
Browse files

refactor: eventHash from array to slice for multihash

parent 02583d4b
......@@ -688,7 +688,7 @@ func (i *RevocationAttribute) GobDecode(data []byte) error {
func (hash eventHash) Value() (driver.Value, error) {
return hash[:], nil
return []byte(hash), nil
func (hash *eventHash) Scan(src interface{}) error {
......@@ -696,7 +696,8 @@ func (hash *eventHash) Scan(src interface{}) error {
if !ok {
return errors.New("cannot convert source: not a []byte")
copy((*hash)[:], s)
*hash = make([]byte, len(s))
copy(*hash, s)
return nil
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment