Skip to content

Commit

Permalink
chore: prevent panic in marshal exec market
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Letang <[email protected]>
  • Loading branch information
jeremyletang committed Apr 24, 2024
1 parent 78870b2 commit 692d7ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/types/snapshot_nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -3139,7 +3139,9 @@ func ExecutionMarketsFromProto(em *snapshot.ExecutionMarkets) *ExecutionMarkets
func (e ExecutionMarkets) IntoProto() *snapshot.ExecutionMarkets {
mkts := make([]*snapshot.Market, 0, len(e.Markets))
for _, m := range e.Markets {
mkts = append(mkts, m.IntoProto())
if m != nil && m.Market != nil {
mkts = append(mkts, m.IntoProto())
}
}
spots := make([]*snapshot.SpotMarket, 0, len(e.SpotMarkets))
for _, m := range e.SpotMarkets {
Expand Down

0 comments on commit 692d7ce

Please sign in to comment.