keeper

package
v0.0.0-...-1237470 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2020 License: GPL-3.0 Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConsensusPeerPrefix = []byte{0x01}
	// To help store the header hash at height where the poly chain switch epoch consensus public keys
	KeyHeaderHashPrefix = []byte{0x02}
)

Functions

func GetConsensusPeerKey

func GetConsensusPeerKey(chainId uint64) []byte

func GetKeyHeaderHashKey

func GetKeyHeaderHashKey(chainId uint64) []byte

func NewQuerier

func NewQuerier(k Keeper) sdk.Querier

NewQuerier returns a minting Querier handler.

Types

type Keeper

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

Keeper of the mint store

func NewKeeper

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

NewKeeper creates a new mint Keeper instance

func (Keeper) GetConsensusPeers

func (keeper Keeper) GetConsensusPeers(ctx sdk.Context, chainId uint64) (*types.ConsensusPeers, error)

func (Keeper) GetKeyHeaderHash

func (keeper Keeper) GetKeyHeaderHash(ctx sdk.Context, chainId uint64) (*polycommon.Uint256, error)

func (Keeper) ProcessHeader

func (keeper Keeper) ProcessHeader(ctx sdk.Context, header *polytype.Header, headerProof []byte, curHeader *polytype.Header) error

func (Keeper) SetConsensusPeers

func (keeper Keeper) SetConsensusPeers(ctx sdk.Context, consensusPeers types.ConsensusPeers) error

func (Keeper) SetKeyHeaderHash

func (keeper Keeper) SetKeyHeaderHash(ctx sdk.Context, chainId uint64, keyHeaderHash polycommon.Uint256) error

func (Keeper) SyncBlockHeaders

func (keeper Keeper) SyncBlockHeaders(ctx sdk.Context, headerStrs []string) error

func (Keeper) SyncGenesisHeader

func (keeper Keeper) SyncGenesisHeader(ctx sdk.Context, genesisHeaderStr string) error

func (Keeper) UpdateConsensusPeer

func (keeper Keeper) UpdateConsensusPeer(ctx sdk.Context, header *polytype.Header) error

func (Keeper) VerifyHeaderByKeyHeaderHash

func (keeper Keeper) VerifyHeaderByKeyHeaderHash(ctx sdk.Context, header *polytype.Header) error

func (Keeper) VerifyHeaderSig

func (keeper Keeper) VerifyHeaderSig(ctx sdk.Context, header *polytype.Header) error

func (Keeper) VerifyHistoricalHeader

func (keeper Keeper) VerifyHistoricalHeader(ctx sdk.Context, header *polytype.Header, headerProof []byte, curHeader *polytype.Header) error

Jump to

Keyboard shortcuts

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