keeper

package
v0.0.0-...-b8831ae Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(k Keeper) sdk.Querier

NewQuerier creates a new querier for scavenge clients.

func RemovePrefixFromHash

func RemovePrefixFromHash(key []byte, prefix []byte) (hash []byte)

RemovePrefixFromHash removes the prefix from the key

Types

type Keeper

type Keeper struct {
	CoinKeeper bank.Keeper
	// contains filtered or unexported fields
}

Keeper of the scavenge store

func NewKeeper

func NewKeeper(coinKeeper bank.Keeper, cdc *codec.Codec, key sdk.StoreKey) Keeper

NewKeeper creates a scavenge keeper

func (Keeper) DeleteScavenge

func (k Keeper) DeleteScavenge(ctx sdk.Context, solutionHash string)

DeleteScavenge deletes a scavenge

func (Keeper) GetCommit

func (k Keeper) GetCommit(ctx sdk.Context, solutionScavengerHash string) (types.Commit, error)

GetCommit returns the commit of a solution

func (Keeper) GetCommitsIterator

func (k Keeper) GetCommitsIterator(ctx sdk.Context) sdk.Iterator

GetCommitsIterator gets an iterator over all commits in which the keys are the prefix and solutionHashes and the values are the scavenges

func (Keeper) GetScavenge

func (k Keeper) GetScavenge(ctx sdk.Context, solutionHash string) (types.Scavenge, error)

GetScavenge returns the scavenge information

func (Keeper) GetScavengesIterator

func (k Keeper) GetScavengesIterator(ctx sdk.Context) sdk.Iterator

GetScavengesIterator gets an iterator over all scavnges in which the keys are the solutionHashes and the values are the scavenges

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

Logger returns a module-specific logger.

func (Keeper) SetCommit

func (k Keeper) SetCommit(ctx sdk.Context, commit types.Commit)

SetCommit sets a scavenge

func (Keeper) SetScavenge

func (k Keeper) SetScavenge(ctx sdk.Context, scavenge types.Scavenge)

SetScavenge sets a scavenge

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL