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 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 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.