Skip to content

Commit

Permalink
readd state lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
joelsmith-2019 committed Jan 14, 2025
1 parent edf6dc9 commit b0af4b1
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ func (k msgServer) RegisterAccountAsGuardian(goCtx context.Context, msg *types.M
return nil, types.ErrGuardianSetNotFound
}

// With the change to allow hot swapping on validator sets > 1 validator, this check is no
// longer useful. However, it is necessary. This check ensures the gas usage of the transaction
// matches the previous implementation as this is included in a non-consensus breaking change.
_, consensusIndexFound := k.GetConsensusGuardianSetIndex(ctx)
if !consensusIndexFound {
return nil, types.ErrConsensusSetUndefined
}

if !latestGuardianSet.ContainsKey(guardianKeyAddr) {
return nil, types.ErrGuardianNotFound
}
Expand Down

0 comments on commit b0af4b1

Please sign in to comment.