types

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: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AttributeValueCategory = ModuleName

	EventTypeSyncHeader           = "sync_header"
	AttributeKeyChainId           = "chain_id"
	AttributeKeyHeight            = "height"
	AttributeKeyBlockHash         = "block_hash"
	AttributeKeyNativeChainHeight = "native_chain_height"
)

Minting module event types

View Source
const (
	// module name
	ModuleName = "headersync"

	// default paramspace for params keeper
	DefaultParamspace = ModuleName

	// StoreKey is the default store key for mint
	StoreKey = ModuleName

	// QuerierRoute is the querier route for the minting store.
	QuerierRoute = StoreKey

	// RouterKey is the message route for gov
	RouterKey = ModuleName
)

nolint

View Source
const (
	TypeMsgSyncGenesis = "sync_genesis"
	TypeMsgSyncHeaders = "sync_headers"
)

Governance message types and routes

View Source
const (
	QueryConsensusPeers = "consensus_peers"
)

Variables

View Source
var (
	ErrDeserializeHeaderFailType    = sdkerrors.Register(ModuleName, 1, "ErrDeserializeHeaderFailType")
	ErrSerializeHeaderFailType      = sdkerrors.Register(ModuleName, 2, "ErrSerializeHeaderFailType")
	ErrHeaderEmptyType              = sdkerrors.Register(ModuleName, 3, "ErrHeaderEmptyType")
	ErrGetKeyHeaderHashType         = sdkerrors.Register(ModuleName, 4, "ErrGetKeyHeaderHashType")
	ErrGetConsensusPeersFailType    = sdkerrors.Register(ModuleName, 5, "ErrGetConsensusPeersFailType")
	ErrBookKeeperNumErrType         = sdkerrors.Register(ModuleName, 6, "ErrBookKeeperNumErrType")
	ErrInvalidPublicKeyType         = sdkerrors.Register(ModuleName, 7, "ErrInvalidPublicKeyType")
	ErrUnmarshalSpecificType        = sdkerrors.Register(ModuleName, 8, "ErrUnmarshalSpecificType")
	ErrVerifyMultiSigFailType       = sdkerrors.Register(ModuleName, 9, "ErrVerifyMultiSignatureFailType")
	ErrDeserializeConsensusPeerType = sdkerrors.Register(ModuleName, 10, "ErrDeserializeConsensusPeerType")
	ErrSyncGenesisHeaderType        = sdkerrors.Register(ModuleName, 11, "ErrSyncGenesisHeaderType")
	ErrSyncBlockHeaderType          = sdkerrors.Register(ModuleName, 12, "ErrSyncBlockHeaderType")
)
View Source
var ModuleCdc *codec.Codec

generic sealed codec to be used throughout this module

Functions

func ErrBookKeeperNum

func ErrBookKeeperNum(headerBookKeeperNum int, consensusNodeNum int) error

func ErrDeserializeConsensusPeer

func ErrDeserializeConsensusPeer(err error) error

func ErrDeserializeHeader

func ErrDeserializeHeader(err error) error

func ErrGetConsensusPeers

func ErrGetConsensusPeers(chainId uint64) error

func ErrGetKeyHeaderHash

func ErrGetKeyHeaderHash(reason string) error

func ErrHeaderEmpty

func ErrHeaderEmpty(headerhash []byte) error

func ErrInvalidPublicKey

func ErrInvalidPublicKey(pubkey string) error

func ErrMarshalSpecificTypeFail

func ErrMarshalSpecificTypeFail(o interface{}, err error) error

func ErrSerializeHeader

func ErrSerializeHeader(err error) error

func ErrSyncBlockHeader

func ErrSyncBlockHeader(operation string, chainId uint64, height uint32, err error) error

func ErrSyncGenesisHeader

func ErrSyncGenesisHeader(reason string) error

func ErrUnmarshalSpecificTypeFail

func ErrUnmarshalSpecificTypeFail(o interface{}, err error) error

func ErrVerifyMultiSigFail

func ErrVerifyMultiSigFail(err error, height uint32) error

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

Types

type ConsensusPeers

type ConsensusPeers struct {
	ChainID uint64
	Height  uint32
	PeerMap map[string]*Peer
}

func (*ConsensusPeers) Deserialization

func (this *ConsensusPeers) Deserialization(source *polycommon.ZeroCopySource) error

func (*ConsensusPeers) Serialization

func (this *ConsensusPeers) Serialization(sink *polycommon.ZeroCopySink)

func (*ConsensusPeers) String

func (this *ConsensusPeers) String() string

type MsgSyncGenesisParam

type MsgSyncGenesisParam struct {
	Syncer        sdk.AccAddress
	GenesisHeader string
}

MsgSend - high level transaction of the coin module

func NewMsgSyncGenesisParam

func NewMsgSyncGenesisParam(syncer sdk.AccAddress, genesisHeader string) MsgSyncGenesisParam

NewMsgSend - construct arbitrary multi-in, multi-out send msg.

func (MsgSyncGenesisParam) GetSignBytes

func (msg MsgSyncGenesisParam) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgSyncGenesisParam) GetSigners

func (msg MsgSyncGenesisParam) GetSigners() []sdk.AccAddress

GetSigners Implements Msg.

func (MsgSyncGenesisParam) Route

func (msg MsgSyncGenesisParam) Route() string

Route Implements Msg.

func (MsgSyncGenesisParam) Type

func (msg MsgSyncGenesisParam) Type() string

Type Implements Msg.

func (MsgSyncGenesisParam) ValidateBasic

func (msg MsgSyncGenesisParam) ValidateBasic() error

ValidateBasic Implements Msg.

type MsgSyncHeadersParam

type MsgSyncHeadersParam struct {
	Syncer  sdk.AccAddress
	Headers []string
}

MsgMultiSend - high level transaction of the coin module

func NewMsgSyncHeadersParam

func NewMsgSyncHeadersParam(syncer sdk.AccAddress, headers []string) MsgSyncHeadersParam

NewMsgMultiSend - construct arbitrary multi-in, multi-out send msg.

func (MsgSyncHeadersParam) GetSignBytes

func (msg MsgSyncHeadersParam) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgSyncHeadersParam) GetSigners

func (msg MsgSyncHeadersParam) GetSigners() []sdk.AccAddress

GetSigners Implements Msg.

func (MsgSyncHeadersParam) Route

func (msg MsgSyncHeadersParam) Route() string

Route Implements Msg

func (MsgSyncHeadersParam) Type

func (msg MsgSyncHeadersParam) Type() string

Type Implements Msg

func (MsgSyncHeadersParam) ValidateBasic

func (msg MsgSyncHeadersParam) ValidateBasic() error

ValidateBasic Implements Msg.

type Peer

type Peer struct {
	Index      uint32
	PeerPubkey string
}

func (*Peer) Deserialization

func (this *Peer) Deserialization(source *polycommon.ZeroCopySource) error

func (*Peer) Serialization

func (this *Peer) Serialization(sink *polycommon.ZeroCopySink)

type QueryConsensusPeersParams

type QueryConsensusPeersParams struct {
	ChainId uint64
}

QueryBalanceParams defines the params for querying an account balance.

func NewQueryConsensusPeersParams

func NewQueryConsensusPeersParams(chainId uint64) QueryConsensusPeersParams

NewQueryBalanceParams creates a new instance of QueryBalanceParams.

Jump to

Keyboard shortcuts

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