ont

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindKeyHeight

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

func GetCrossChainMsg

func GetCrossChainMsg(native *native.NativeService, chainID uint64, height uint32) (*otypes.CrossChainMsg, error)

func GetHeaderByHash

func GetHeaderByHash(native *native.NativeService, chainID uint64, hash common.Uint256) (*otypes.Header, error)

func GetHeaderByHeight

func GetHeaderByHeight(native *native.NativeService, chainID uint64, height uint32) (*otypes.Header, error)

func PutBlockHeader

func PutBlockHeader(native *native.NativeService, chainID uint64, blockHeader *otypes.Header) error

func PutCrossChainMsg

func PutCrossChainMsg(native *native.NativeService, chainID uint64, crossChainMsg *otypes.CrossChainMsg) error

func PutKeyHeights

func PutKeyHeights(native *native.NativeService, chainID uint64, keyHeights *KeyHeights) error

func UpdateConsensusPeer

func UpdateConsensusPeer(native *native.NativeService, chainID uint64, header *otypes.Header) error

func VerifyCrossChainMsg

func VerifyCrossChainMsg(native *native.NativeService, chainID uint64, crossChainMsg *otypes.CrossChainMsg,
	bookkeepers []keypair.PublicKey) error

Types

type ConsensusPeers

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

func (*ConsensusPeers) Deserialization

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

func (*ConsensusPeers) Serialization

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

type KeyHeights

type KeyHeights struct {
	HeightList []uint32
}

func GetKeyHeights

func GetKeyHeights(native *native.NativeService, chainID uint64) (*KeyHeights, error)

func (*KeyHeights) Deserialization

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

func (*KeyHeights) Serialization

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

type ONTHandler

type ONTHandler struct {
}

func NewONTHandler

func NewONTHandler() *ONTHandler

func (*ONTHandler) SyncBlockHeader

func (this *ONTHandler) SyncBlockHeader(native *native.NativeService) error

func (*ONTHandler) SyncCrossChainMsg

func (this *ONTHandler) SyncCrossChainMsg(native *native.NativeService) error

func (*ONTHandler) SyncGenesisHeader

func (this *ONTHandler) SyncGenesisHeader(native *native.NativeService) error

type Peer

type Peer struct {
	Index      uint32
	PeerPubkey string
}

func (*Peer) Deserialization

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

func (*Peer) Serialization

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

Jump to

Keyboard shortcuts

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