Skip to content

Commit

Permalink
chore: small comments
Browse files Browse the repository at this point in the history
EclesioMeloJunior committed Dec 14, 2024
1 parent d16b056 commit e5d8019
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion dot/parachain/prospective-parachains/inclusion_emulator.go
Original file line number Diff line number Diff line change
@@ -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
}
2 changes: 1 addition & 1 deletion dot/parachain/types/async_backing.go
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e5d8019

Please sign in to comment.