fix: need to set self on message handler

This commit is contained in:
Derrick Hammer 2024-01-07 23:01:09 -05:00
parent ed48f60b12
commit 24e2b3a79f
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 0 deletions

View File

@ -83,6 +83,7 @@ func (s *SignedMessage) HandleMessage(node interfaces.Node, peer net.Peer, verif
if msgHandler, valid := GetMessageType(types.ProtocolMethod(payload.kind)); valid { if msgHandler, valid := GetMessageType(types.ProtocolMethod(payload.kind)); valid {
msgHandler.SetIncomingMessage(s) msgHandler.SetIncomingMessage(s)
msgHandler.SetSelf(msgHandler)
err := msgpack.Unmarshal(payload.message, &msgHandler) err := msgpack.Unmarshal(payload.message, &msgHandler)
if err != nil { if err != nil {
return err return err