Skip to content

Commit

Permalink
fix: protect against panic when updating pparams from Conway genesis (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
agaffney authored Oct 30, 2024
1 parent d75eff5 commit f14c9e5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ledger/conway/pparams.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ func (p *ConwayProtocolParameters) UpdateFromGenesis(genesis *ConwayGenesis) {
}
}
if len(genesis.PlutusV3CostModel) > 0 {
if p.CostModels == nil {
p.CostModels = make(map[uint][]int64)
}
p.CostModels[2] = genesis.PlutusV3CostModel
}
if genesis.PoolVotingThresholds.MotionNoConfidence != nil {
Expand Down

0 comments on commit f14c9e5

Please sign in to comment.