From 99f51e008d68989875a0faaf43e712996707bf27 Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Sat, 11 May 2024 16:52:11 -0400 Subject: [PATCH] fix: return immediately on empty nexttx message (#610) Signed-off-by: Chris Gianelloni --- protocol/localtxmonitor/messages.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/protocol/localtxmonitor/messages.go b/protocol/localtxmonitor/messages.go index f68a3fad..eae8cd19 100644 --- a/protocol/localtxmonitor/messages.go +++ b/protocol/localtxmonitor/messages.go @@ -167,6 +167,9 @@ func (m *MsgReplyNextTx) UnmarshalCBOR(data []byte) error { if _, err := cbor.Decode(data, &tmp); err != nil { return err } + if tmp == nil { + return nil + } // We know what the value will be, but it doesn't hurt to use the actual value from the message m.MessageType = uint8(tmp[0].(uint64)) // The ReplyNextTx message has a variable number of arguments