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

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