service

package
v0.0.0-...-2287164 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckTx

func CheckTx()

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 PolyListen

func PolyListen()

Poly listen service implementation. Check blocks from height `left` to `right-1` and get cross-chain txs with headers that prove them. It execute once per `ctx.Conf.PolyListenInterval` sec. This function run as a go-routine.

func StartListen

func StartListen()

Start listen cosmos and Poly

func StartRelay

func StartRelay()

func ToCosmosRoutine

func ToCosmosRoutine()

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

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