Documentation ¶
Index ¶
- func QuerierClients(ctx sdk.Context, req abci.RequestQuery, k Keeper) ([]byte, error)
- type Keeper
- func (k Keeper) CheckMisbehaviourAndUpdateState(ctx sdk.Context, misbehaviour exported.Misbehaviour) error
- func (k Keeper) ClientStore(ctx sdk.Context, clientID string) sdk.KVStore
- func (k Keeper) CreateClient(ctx sdk.Context, clientState exported.ClientState, ...) (exported.ClientState, error)
- func (k Keeper) GetAllClients(ctx sdk.Context) (states []exported.ClientState)
- func (k Keeper) GetAllConsensusStates(ctx sdk.Context) (clientConsStates []types.ClientConsensusStates)
- func (k Keeper) GetClientConsensusState(ctx sdk.Context, clientID string, height uint64) (exported.ConsensusState, bool)
- func (k Keeper) GetClientConsensusStateLTE(ctx sdk.Context, clientID string, maxHeight uint64) (exported.ConsensusState, bool)
- func (k Keeper) GetClientState(ctx sdk.Context, clientID string) (exported.ClientState, bool)
- func (k Keeper) GetClientType(ctx sdk.Context, clientID string) (exported.ClientType, bool)
- func (k Keeper) GetLatestClientConsensusState(ctx sdk.Context, clientID string) (exported.ConsensusState, bool)
- func (k Keeper) GetSelfConsensusState(ctx sdk.Context, height uint64) (exported.ConsensusState, bool)
- func (k Keeper) HasClientConsensusState(ctx sdk.Context, clientID string, height uint64) bool
- func (k Keeper) IterateClients(ctx sdk.Context, cb func(exported.ClientState) bool)
- func (k Keeper) IterateConsensusStates(ctx sdk.Context, cb func(clientID string, cs exported.ConsensusState) bool)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) SetClientConsensusState(ctx sdk.Context, clientID string, height uint64, ...)
- func (k Keeper) SetClientState(ctx sdk.Context, clientState exported.ClientState)
- func (k Keeper) SetClientType(ctx sdk.Context, clientID string, clientType exported.ClientType)
- func (k Keeper) UpdateClient(ctx sdk.Context, clientID string, header exported.Header) (exported.ClientState, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func QuerierClients ¶
QuerierClients defines the sdk.Querier to query all the light client states.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper represents a type that grants read and write permissions to any client state information
func (Keeper) CheckMisbehaviourAndUpdateState ¶
func (k Keeper) CheckMisbehaviourAndUpdateState(ctx sdk.Context, misbehaviour exported.Misbehaviour) error
CheckMisbehaviourAndUpdateState checks for client misbehaviour and freezes the client if so.
func (Keeper) ClientStore ¶
ClientStore returns isolated prefix store for each client so they can read/write in separate namespace without being able to read/write other client's data
func (Keeper) CreateClient ¶
func (k Keeper) CreateClient( ctx sdk.Context, clientState exported.ClientState, consensusState exported.ConsensusState, ) (exported.ClientState, error)
CreateClient creates a new client state and populates it with a given consensus state as defined in https://github.com/cosmos/ics/tree/master/spec/ics-002-client-semantics#create
CONTRACT: ClientState was constructed correctly from given initial consensusState
func (Keeper) GetAllClients ¶
func (k Keeper) GetAllClients(ctx sdk.Context) (states []exported.ClientState)
GetAllClients returns all stored light client State objects.
func (Keeper) GetAllConsensusStates ¶
func (k Keeper) GetAllConsensusStates(ctx sdk.Context) (clientConsStates []types.ClientConsensusStates)
GetAllConsensusStates returns all stored client consensus states. NOTE: non deterministic.
func (Keeper) GetClientConsensusState ¶
func (k Keeper) GetClientConsensusState(ctx sdk.Context, clientID string, height uint64) (exported.ConsensusState, bool)
GetClientConsensusState gets the stored consensus state from a client at a given height.
func (Keeper) GetClientConsensusStateLTE ¶
func (k Keeper) GetClientConsensusStateLTE(ctx sdk.Context, clientID string, maxHeight uint64) (exported.ConsensusState, bool)
GetClientConsensusStateLTE will get the latest ConsensusState of a particular client at the latest height less than or equal to the given height
func (Keeper) GetClientState ¶
GetClientState gets a particular client from the store
func (Keeper) GetClientType ¶
GetClientType gets the consensus type for a specific client
func (Keeper) GetLatestClientConsensusState ¶
func (k Keeper) GetLatestClientConsensusState(ctx sdk.Context, clientID string) (exported.ConsensusState, bool)
GetLatestClientConsensusState gets the latest ConsensusState stored for a given client
func (Keeper) GetSelfConsensusState ¶
func (k Keeper) GetSelfConsensusState(ctx sdk.Context, height uint64) (exported.ConsensusState, bool)
GetSelfConsensusState introspects the (self) past historical info at a given height and returns the expected consensus state at that height.
func (Keeper) HasClientConsensusState ¶
HasClientConsensusState returns if keeper has a ConsensusState for a particular client at the given height
func (Keeper) IterateClients ¶
IterateClients provides an iterator over all stored light client State objects. For each State object, cb will be called. If the cb returns true, the iterator will close and stop.
func (Keeper) IterateConsensusStates ¶
func (k Keeper) IterateConsensusStates(ctx sdk.Context, cb func(clientID string, cs exported.ConsensusState) bool)
IterateConsensusStates provides an iterator over all stored consensus states. objects. For each State object, cb will be called. If the cb returns true, the iterator will close and stop.
func (Keeper) SetClientConsensusState ¶
func (k Keeper) SetClientConsensusState(ctx sdk.Context, clientID string, height uint64, consensusState exported.ConsensusState)
SetClientConsensusState sets a ConsensusState to a particular client at the given height
func (Keeper) SetClientState ¶
func (k Keeper) SetClientState(ctx sdk.Context, clientState exported.ClientState)
SetClientState sets a particular Client to the store
func (Keeper) SetClientType ¶
SetClientType sets the specific client consensus type to the provable store