service

package
v0.0.0-...-ac1e388 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CosmosListen

func CosmosListen()

Cosmos listen service implementation. Check the blocks of COSMOS from height `left` to height `right`, commit the cross-chain txs and headers to prove txs to chain Poly. It execute once per `ctx.Conf.CosmosListenInterval` sec. And update height `left` `right` after execution for next round. This function will run as a go-routine.

func GetBestCosmosHeightForBor

func GetBestCosmosHeightForBor() (int64, error)

func GetCosmosHeightFromPoly

func GetCosmosHeightFromPoly() (int64, error)

func StartListen

func StartListen()

Start listen cosmos and Poly

func StartRelay

func StartRelay()

func ToPolyRoutine

func ToPolyRoutine()

Process with message from channel `ToPoly`. When type is `TyHeader`, we must finish the procession for this message before processing the transaction-messages. When type is `TyTx`, we relay this transaction info and its proof to Poly. When type is `TyUpdateHeight`, we update the cosmos height that already checked in our db. This run as a go-routine

Types

This section is empty.

Jump to

Keyboard shortcuts

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