Skip to content

Commit

Permalink
Corrected helper location
Browse files Browse the repository at this point in the history
  • Loading branch information
Artemkaaas committed Nov 21, 2024
1 parent 40d26b7 commit f06d87f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 0 additions & 14 deletions x/pki/keeper/grpc_query_revoked_certificates.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,3 @@ func (k Keeper) RevokedCertificates(c context.Context, req *types.QueryGetRevoke

return &types.QueryGetRevokedCertificatesResponse{RevokedCertificates: val}, nil
}

// IsRevokedCertificatePresent Check if the Revoked Certificate is present in the store.
func (k Keeper) IsRevokedCertificatePresent(
ctx sdk.Context,
subject string,
subjectKeyID string,
) bool {
store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.RevokedCertificatesKeyPrefix))

return store.Has(types.RevokedCertificatesKey(
subject,
subjectKeyID,
))
}
14 changes: 14 additions & 0 deletions x/pki/keeper/revoked_certificates.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,17 @@ func (k msgServer) removeOrUpdateRevokedX509Cert(
)
}
}

// IsRevokedCertificatePresent Check if the Revoked Certificate is present in the store.
func (k Keeper) IsRevokedCertificatePresent(
ctx sdk.Context,
subject string,
subjectKeyID string,
) bool {
store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.RevokedCertificatesKeyPrefix))

return store.Has(types.RevokedCertificatesKey(
subject,
subjectKeyID,
))
}

0 comments on commit f06d87f

Please sign in to comment.