Skip to content

Commit

Permalink
rename the bls variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
trestinlsd committed Feb 21, 2025
1 parent 51b010f commit 4d83208
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions x/avs/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,18 +314,18 @@ func (k Keeper) RegisterBLSPublicKey(ctx sdk.Context, params *types.BlsParams) e
if k.IsExistPubKeyForAVS(ctx, params.OperatorAddress.String(), params.AvsAddress.String()) {
return errorsmod.Wrap(types.ErrAlreadyExists, fmt.Sprintf("the operator is :%s", params.OperatorAddress))
}
bls := &types.BlsPubKeyInfo{
blsInfo := &types.BlsPubKeyInfo{
AvsAddress: strings.ToLower(params.AvsAddress.String()),
OperatorAddress: strings.ToLower(params.OperatorAddress.String()),
PubKey: params.PubKey,
}
// check a bls key can only be used once.
// if operator are using multiple servers for different AVSs .
// In case one server is compromised, signing can continue as expected on the AVSs for which there has been no compromise.
if k.IsExistPubKey(ctx, bls) {
if k.IsExistPubKey(ctx, blsInfo) {
return errorsmod.Wrap(types.ErrAlreadyExists, fmt.Sprintf("the bls key is already exists:%s", bls.PubKey))
}
return k.SetOperatorPubKey(ctx, bls)
return k.SetOperatorPubKey(ctx, blsInfo)
}

func (k Keeper) OperatorOptAction(ctx sdk.Context, params *types.OperatorOptParams) error {
Expand Down

0 comments on commit 4d83208

Please sign in to comment.