refactor: use types.StorageLocationType

This commit is contained in:
Derrick Hammer 2024-01-09 06:56:44 -05:00
parent 27cc49fb45
commit 47847ea124
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 3 deletions

View File

@ -5,6 +5,7 @@ import (
"git.lumeweb.com/LumeWeb/libs5-go/interfaces"
"git.lumeweb.com/LumeWeb/libs5-go/net"
"git.lumeweb.com/LumeWeb/libs5-go/protocol/base"
"git.lumeweb.com/LumeWeb/libs5-go/types"
"github.com/emirpasic/gods/sets/hashset"
"github.com/vmihailenco/msgpack/v5"
"go.uber.org/zap"
@ -15,7 +16,7 @@ var _ base.IncomingMessageTyped = (*HashQuery)(nil)
type HashQuery struct {
hash *encoding.Multihash
kinds []int
kinds []types.StorageLocationType
base.IncomingMessageTypedImpl
base.IncomingMessageHandler
@ -29,7 +30,7 @@ func (h HashQuery) Hash() *encoding.Multihash {
return h.hash
}
func (h HashQuery) Kinds() []int {
func (h HashQuery) Kinds() []types.StorageLocationType {
return h.kinds
}
@ -42,7 +43,7 @@ func (h *HashQuery) DecodeMessage(dec *msgpack.Decoder) error {
h.hash = encoding.NewMultihash(hash)
var kinds []int
var kinds []types.StorageLocationType
err = dec.Decode(&kinds)
if err != nil {
return err