fix: register RecordTypeStorageLocation

This commit is contained in:
Derrick Hammer 2024-01-09 13:58:11 -05:00
parent ed97c03d16
commit 8806e69a66
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 7 additions and 0 deletions

View File

@ -24,6 +24,9 @@ func Init() {
RegisterMessageType(int(types.ProtocolMethodHashQuery), func() base.IncomingMessage { RegisterMessageType(int(types.ProtocolMethodHashQuery), func() base.IncomingMessage {
return NewHashQuery() return NewHashQuery()
}) })
RegisterMessageType(int(types.RecordTypeStorageLocation), func() base.IncomingMessage {
return NewStorageLocation()
})
RegisterMessageType(int(types.ProtocolMethodSignedMessage), func() base.IncomingMessage { RegisterMessageType(int(types.ProtocolMethodSignedMessage), func() base.IncomingMessage {
return signed.NewSignedMessage() return signed.NewSignedMessage()
}) })

View File

@ -30,6 +30,10 @@ type StorageLocation struct {
base.IncomingMessageHandler base.IncomingMessageHandler
} }
func NewStorageLocation() *StorageLocation {
return &StorageLocation{}
}
func (s *StorageLocation) DecodeMessage(dec *msgpack.Decoder) error { func (s *StorageLocation) DecodeMessage(dec *msgpack.Decoder) error {
data, err := dec.DecodeRaw() data, err := dec.DecodeRaw()