types

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModuleName defines the name of the module
	ModuleName = "sidechannel"

	// StoreKey is the store key string for bor
	StoreKey = ModuleName

	// RouterKey is the message route for bor
	RouterKey = ModuleName

	// QuerierRoute is the querier route for bor
	QuerierRoute = ModuleName

	// DefaultParamspace default name for parameter store
	DefaultParamspace = ModuleName

	// TStoreKey is the string store key for the param transient store
	TStoreKey = "transient_params"
)

Variables

View Source
var (
	// TxsKeyPrefix prefix for txs
	TxsKeyPrefix = []byte{0x01}

	// ValidatorsKeyPrefix prefix for validators
	ValidatorsKeyPrefix = []byte{0x02}
)
View Source
var ModuleCdc = codec.New()

ModuleCdc module codec

Functions

func TxStoreKey

func TxStoreKey(height int64, hash []byte) []byte

TxStoreKey returns key used to get tx from store

func TxsStoreKey

func TxsStoreKey(height int64) []byte

TxsStoreKey returns key used to get txs from store

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis performs basic validation of topup genesis data returning an error for any failed validation criteria.

func ValidatorsKey

func ValidatorsKey(height int64) []byte

ValidatorsKey returns key used to get past-validators from store

Types

type GenesisState

type GenesisState struct {
	PastCommits []PastCommit `json:"past_commits" yaml:"past_commits"`
}

GenesisState is the sidechannel state that must be provided at genesis.

func DefaultGenesisState

func DefaultGenesisState() GenesisState

DefaultGenesisState returns a default genesis state

func NewGenesisState

func NewGenesisState(pastCommits []PastCommit) GenesisState

NewGenesisState creates a new genesis state.

type PastCommit

type PastCommit struct {
	Height int64       `json:"height" yaml:"height"`
	Txs    tmTypes.Txs `json:"txs" yaml:"txs"`
}

PastCommit represent past commit for the record and process side-txs

Jump to

Keyboard shortcuts

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