diff --git a/dot/parachain/prospective-parachains/inclusion_emulator.go b/dot/parachain/prospective-parachains/inclusion_emulator.go index f1dd020482..648f3415a8 100644 --- a/dot/parachain/prospective-parachains/inclusion_emulator.go +++ b/dot/parachain/prospective-parachains/inclusion_emulator.go @@ -454,7 +454,11 @@ func validateAgainstConstraints( } if commitments.NewValidationCode != nil { - switch constraints.UpgradeRestriction.(type) { + restriction, err := constraints.UpgradeRestriction.Value() + if err != nil { + return fmt.Errorf("while retrieving value: %w", err) + } + switch restriction.(type) { case *parachaintypes.Present: return errCodeUpgradeRestricted } diff --git a/dot/parachain/types/async_backing.go b/dot/parachain/types/async_backing.go index b7a635e4b7..e35ec994dd 100644 --- a/dot/parachain/types/async_backing.go +++ b/dot/parachain/types/async_backing.go @@ -69,7 +69,7 @@ type Constraints struct { // The expected validation-code-hash of this parachain. ValidationCodeHash ValidationCodeHash // The code upgrade restriction signal as-of this parachain. - UpgradeRestriction UpgradeRestriction + UpgradeRestriction *UpgradeRestriction // The future validation code hash, if any, and at what relay-parent // number the upgrade would be minimally applied. FutureValidationCode *FutureValidationCode