func (r mockRepo) Store(v GenericKey) error {
	data, err := json.Marshal(v)
	if err != nil {
		return err
	}

	// Add to account set if an hash is given
	if v.GetAddressHash() != nil {
		h := v.GetAddressHash().String()
		if r.addr[h] == nil {
			r.addr[h] = map[string]int{}
		}
		r.addr[h][v.GetID()] = 1
	}

	r.keys[v.GetID()] = data
	return err
}
// Store the given key in the repository
Store the given key in the repository
// Store the given key in the repository
func (r mockRepo) Store(v GenericKey) error {
	data, err := json.Marshal(v)
	if err != nil {
		return err
	}
	if v.GetAddressHash() != nil {
		h := v.GetAddressHash().String()
		if r.addr[h] == nil {
			r.addr[h] = map[string]int{}
		}
		r.addr[h][v.GetID()] = 1
	}
	r.keys[v.GetID()] = data
	return err
}
func ( r mockRepo ) Store ( v GenericKey ) error { data , err := json . Marshal ( v ) if err != nil { return err } if v . GetAddressHash ( ) != nil { h := v . GetAddressHash ( ) . String ( ) if r . addr [ h ] == nil { r . addr [ h ] = map [ string ] int { } } r . addr [ h ] [ v . GetID ( ) ] = 1 } r . keys [ v . GetID ( ) ] = data return err }
Store the given key in the repository
Store the given key in the repository
// Add to account set if an hash is given