keeper

package
v0.0.0-...-7131e01 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2019 License: Apache-2.0 Imports: 18 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTestAddrs

func CreateTestAddrs(numAddrs int) ([]sdk.AccAddress, []sdk.ValAddress)

nolint: unparam

func MakeTestCodec

func MakeTestCodec() *codec.Codec

MakeTestCodec creates a codec used only for testing

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

Keeper maintains the link to data storage and exposes getter/setter methods for the various parts of the state machine

func CreateTestKeepers

func CreateTestKeepers(t *testing.T, consensusNeeded float64, validatorPowers []int64) (sdk.Context, auth.AccountKeeper, Keeper, bank.Keeper, []sdk.ValAddress, sdk.Error)

CreateTestKeepers greates an OracleKeeper, AccountKeeper and Context to be used for test input

func NewKeeper

func NewKeeper(stakeKeeper staking.Keeper, storeKey sdk.StoreKey, cdc *codec.Codec, codespace sdk.CodespaceType, consensusNeeded float64) (Keeper, sdk.Error)

NewKeeper creates new instances of the oracle Keeper

func (Keeper) Codespace

func (k Keeper) Codespace() sdk.CodespaceType

Codespace returns the codespace

func (Keeper) GetProphecy

func (k Keeper) GetProphecy(ctx sdk.Context, id string) (types.Prophecy, sdk.Error)

GetProphecy gets the entire prophecy data struct for a given id

func (Keeper) ProcessClaim

func (k Keeper) ProcessClaim(ctx sdk.Context, id string, validator sdk.ValAddress, claim string) (types.Status, sdk.Error)

Jump to

Keyboard shortcuts

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