From 8806e69a660d55bd7a5e7c4f7ef34fc8420255f8 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Tue, 9 Jan 2024 13:58:11 -0500 Subject: [PATCH] fix: register RecordTypeStorageLocation --- protocol/message.go | 3 +++ protocol/storage_location.go | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/protocol/message.go b/protocol/message.go index 290a164..47564e1 100644 --- a/protocol/message.go +++ b/protocol/message.go @@ -24,6 +24,9 @@ func Init() { RegisterMessageType(int(types.ProtocolMethodHashQuery), func() base.IncomingMessage { return NewHashQuery() }) + RegisterMessageType(int(types.RecordTypeStorageLocation), func() base.IncomingMessage { + return NewStorageLocation() + }) RegisterMessageType(int(types.ProtocolMethodSignedMessage), func() base.IncomingMessage { return signed.NewSignedMessage() }) diff --git a/protocol/storage_location.go b/protocol/storage_location.go index c1ded7a..ab9a2d7 100644 --- a/protocol/storage_location.go +++ b/protocol/storage_location.go @@ -30,6 +30,10 @@ type StorageLocation struct { base.IncomingMessageHandler } +func NewStorageLocation() *StorageLocation { + return &StorageLocation{} +} + func (s *StorageLocation) DecodeMessage(dec *msgpack.Decoder) error { data, err := dec.DecodeRaw()