common

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: LGPL-3.0 Imports: 6 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

View Source
const (
	//key prefix
	CROSS_CHAIN_MSG             = "crossChainMsg"
	CURRENT_MSG_HEIGHT          = "currentMsgHeight"
	BLOCK_HEADER                = "blockHeader"
	CURRENT_HEADER_HEIGHT       = "currentHeaderHeight"
	HEADER_INDEX                = "headerIndex"
	CONSENSUS_PEER              = "consensusPeer"
	CONSENSUS_PEER_BLOCK_HEIGHT = "consensusPeerBlockHeight"
	KEY_HEIGHTS                 = "keyHeights"
	ETH_CACHE                   = "ethCaches"
	GENESIS_HEADER              = "genesisHeader"
	MAIN_CHAIN                  = "mainChain"
	EPOCH_SWITCH                = "epochSwitch"
	SYNC_HEADER_NAME            = "syncHeader"
	SYNC_CROSSCHAIN_MSG         = "syncCrossChainMsg"
)

Variables

This section is empty.

Functions

func NotifyPutCrossChainMsg

func NotifyPutCrossChainMsg(native *native.NativeService, chainID uint64, height uint32)

func NotifyPutHeader

func NotifyPutHeader(native *native.NativeService, chainID uint64, height uint64, blockHash string)

Types

type HeaderSyncHandler

type HeaderSyncHandler interface {
	SyncGenesisHeader(service *native.NativeService) error
	SyncBlockHeader(service *native.NativeService) error
	SyncCrossChainMsg(service *native.NativeService) error
}

type SyncBlockHeaderParam

type SyncBlockHeaderParam struct {
	ChainID uint64
	Address common.Address
	Headers [][]byte
}

func (*SyncBlockHeaderParam) Deserialization

func (this *SyncBlockHeaderParam) Deserialization(source *common.ZeroCopySource) error

func (*SyncBlockHeaderParam) Serialization

func (this *SyncBlockHeaderParam) Serialization(sink *common.ZeroCopySink)

type SyncCrossChainMsgParam

type SyncCrossChainMsgParam struct {
	ChainID        uint64
	Address        common.Address
	CrossChainMsgs [][]byte
}

func (*SyncCrossChainMsgParam) Deserialization

func (this *SyncCrossChainMsgParam) Deserialization(source *common.ZeroCopySource) error

func (*SyncCrossChainMsgParam) Serialization

func (this *SyncCrossChainMsgParam) Serialization(sink *common.ZeroCopySink)

type SyncGenesisHeaderParam

type SyncGenesisHeaderParam struct {
	ChainID       uint64
	GenesisHeader []byte
}

func (*SyncGenesisHeaderParam) Deserialization

func (this *SyncGenesisHeaderParam) Deserialization(source *common.ZeroCopySource) error

func (*SyncGenesisHeaderParam) Serialization

func (this *SyncGenesisHeaderParam) Serialization(sink *common.ZeroCopySink)

Jump to

Keyboard shortcuts

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