Skip to content

Commit

Permalink
chore: unexport sharedKeeperQueryClient
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanchriswhite committed Dec 13, 2024
1 parent d630484 commit 62f15ae
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions x/proof/types/shared_query_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (
sharedtypes "github.com/pokt-network/poktroll/x/shared/types"
)

var _ client.SharedQueryClient = (*SharedKeeperQueryClient)(nil)
var _ client.SharedQueryClient = (*sharedKeeperQueryClient)(nil)

// SharedKeeperQueryClient is a thin wrapper around the SharedKeeper.
// sharedKeeperQueryClient is a thin wrapper around the SharedKeeper.
// It does not rely on the QueryClient, and therefore does not make any
// network requests as in the off-chain implementation.
type SharedKeeperQueryClient struct {
type sharedKeeperQueryClient struct {
client.ParamsQuerier[*sharedtypes.Params]

sharedKeeper SharedKeeper
Expand All @@ -28,7 +28,7 @@ func NewSharedKeeperQueryClient(
) client.SharedQueryClient {
keeperParamsQuerier := keeper.NewKeeperParamsQuerier[sharedtypes.Params](sharedKeeper)

return &SharedKeeperQueryClient{
return &sharedKeeperQueryClient{
ParamsQuerier: keeperParamsQuerier,
sharedKeeper: sharedKeeper,
sessionKeeper: sessionKeeper,
Expand All @@ -39,7 +39,7 @@ func NewSharedKeeperQueryClient(
// for the session which includes queryHeight elapses.
// The grace period is the number of blocks after the session ends during which relays
// SHOULD be included in the session which most recently ended.
func (sqc *SharedKeeperQueryClient) GetSessionGracePeriodEndHeight(
func (sqc *sharedKeeperQueryClient) GetSessionGracePeriodEndHeight(
ctx context.Context,
queryHeight int64,
) (int64, error) {
Expand All @@ -53,7 +53,7 @@ func (sqc *SharedKeeperQueryClient) GetSessionGracePeriodEndHeight(

// GetClaimWindowOpenHeight returns the block height at which the claim window of
// the session that includes queryHeight opens.
func (sqc *SharedKeeperQueryClient) GetClaimWindowOpenHeight(
func (sqc *sharedKeeperQueryClient) GetClaimWindowOpenHeight(
ctx context.Context,
queryHeight int64,
) (int64, error) {
Expand All @@ -67,7 +67,7 @@ func (sqc *SharedKeeperQueryClient) GetClaimWindowOpenHeight(

// GetProofWindowOpenHeight returns the block height at which the proof window of
// the session that includes queryHeight opens.
func (sqc *SharedKeeperQueryClient) GetProofWindowOpenHeight(
func (sqc *sharedKeeperQueryClient) GetProofWindowOpenHeight(
ctx context.Context,
queryHeight int64,
) (int64, error) {
Expand All @@ -81,7 +81,7 @@ func (sqc *SharedKeeperQueryClient) GetProofWindowOpenHeight(

// GetEarliestSupplierClaimCommitHeight returns the earliest block height at which a claim
// for the session that includes queryHeight can be committed for a given supplier.
func (sqc *SharedKeeperQueryClient) GetEarliestSupplierClaimCommitHeight(
func (sqc *sharedKeeperQueryClient) GetEarliestSupplierClaimCommitHeight(
ctx context.Context,
queryHeight int64,
supplierOperatorAddr string,
Expand Down Expand Up @@ -109,7 +109,7 @@ func (sqc *SharedKeeperQueryClient) GetEarliestSupplierClaimCommitHeight(

// GetEarliestSupplierProofCommitHeight returns the earliest block height at which a proof
// for the session that includes queryHeight can be committed for a given supplier.
func (sqc *SharedKeeperQueryClient) GetEarliestSupplierProofCommitHeight(
func (sqc *sharedKeeperQueryClient) GetEarliestSupplierProofCommitHeight(
ctx context.Context,
queryHeight int64,
supplierOperatorAddr string,
Expand Down Expand Up @@ -138,7 +138,7 @@ func (sqc *SharedKeeperQueryClient) GetEarliestSupplierProofCommitHeight(
// GetComputeUnitsToTokensMultiplier returns the multiplier used to convert compute
// units to tokens. The caller likely SHOULD pass the session start height for queryHeight
// as to avoid miscalculations in scenarios where the params were changed mid-session.
func (sqc *SharedKeeperQueryClient) GetComputeUnitsToTokensMultiplier(ctx context.Context, queryHeight int64) (uint64, error) {
func (sqc *sharedKeeperQueryClient) GetComputeUnitsToTokensMultiplier(ctx context.Context, queryHeight int64) (uint64, error) {
sharedParams, err := sqc.GetParamsAtHeight(ctx, queryHeight)
if err != nil {
return 0, err
Expand Down

0 comments on commit 62f15ae

Please sign in to comment.