From 897c9061d4699ef02ff853281a755947d900ab9b Mon Sep 17 00:00:00 2001 From: Jeremy Letang Date: Wed, 24 Apr 2024 20:23:13 +0100 Subject: [PATCH] chore: fix panic in governance --- core/governance/snapshot.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/governance/snapshot.go b/core/governance/snapshot.go index f459601acdd..5278388ef82 100644 --- a/core/governance/snapshot.go +++ b/core/governance/snapshot.go @@ -412,6 +412,9 @@ func (e *Engine) restoreEnactedProposals(ctx context.Context, enacted *types.Gov vevts := []events.Event{} e.log.Debug("restoring enacted proposals snapshot", logging.Int("nproposals", len(enacted.Proposals))) for _, p := range enacted.Proposals { + if p.Proposal == nil { + continue + } pp := &proposal{ Proposal: p.Proposal, yes: votesAsMap(p.Yes),