From 5634c5938a219febf5ea28045147c1deda20cefd Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Wed, 5 Jun 2024 17:36:11 -0400 Subject: [PATCH] fix(chainsync): guard against nil in wrapped header Signed-off-by: Chris Gianelloni --- protocol/chainsync/messages.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/protocol/chainsync/messages.go b/protocol/chainsync/messages.go index 59141219..ddc0dca5 100644 --- a/protocol/chainsync/messages.go +++ b/protocol/chainsync/messages.go @@ -186,7 +186,9 @@ func NewMsgRollForwardNtN( Tip: tip, } wrappedHeader := NewWrappedHeader(era, byronType, blockCbor) - m.WrappedHeader = *wrappedHeader + if wrappedHeader != nil { + m.WrappedHeader = *wrappedHeader + } return m }