common

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: LGPL-3.0 Imports: 6 Imported by: 0

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"
	POLYGON_SPAN                = "polygonSpan"
)

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