Skip to content

Commit

Permalink
fix(chainsync): guard against nil in wrapped header (#650)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
  • Loading branch information
wolf31o2 authored Jun 5, 2024
1 parent 856b5cb commit d072f88
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion protocol/chainsync/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ func NewMsgRollForwardNtN(
Tip: tip,
}
wrappedHeader := NewWrappedHeader(era, byronType, blockCbor)
m.WrappedHeader = *wrappedHeader
if wrappedHeader != nil {
m.WrappedHeader = *wrappedHeader
}
return m
}

Expand Down

0 comments on commit d072f88

Please sign in to comment.