chains

package
v0.0.0-...-0928cd4 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TrapSignal

func TrapSignal(cleanupFunc func())

Types

type ChainLogs

type ChainLogs struct {
	Config *config.Config
	Chains map[string]*VirtualChain
	// contains filtered or unexported fields
}

func NewChainLogs

func NewChainLogs(config *config.Config, logger log.Logger) *ChainLogs

func (*ChainLogs) RegisterChain

func (a *ChainLogs) RegisterChain(chainName string, chain *VirtualChain)

func (*ChainLogs) Run

func (a *ChainLogs) Run()

type VirtualChain

type VirtualChain struct {
	Scanner                     scanner.IScanner
	Store                       store.IStore
	BlockInterval               int64
	ChainName                   string
	ChainID                     [32]byte
	GenesisMainChainBlockHeight int64

	PrevBlockHash         [32]byte
	CurrentBlockHeight    int64
	CurrentBlockTimestamp int64
	CurrentBlockHash      [32]byte
	// contains filtered or unexported fields
}

func NewBchVirtualChain

func NewBchVirtualChain(cfg *config.ChainConfig, store store.IStore, logger log.Logger) *VirtualChain

func (*VirtualChain) GenerateNewBlock

func (v *VirtualChain) GenerateNewBlock(scanBlock bool)

func (*VirtualChain) GetConfirmations

func (v *VirtualChain) GetConfirmations(txHash [32]byte) int32

func (*VirtualChain) RecoveryFromDB

func (v *VirtualChain) RecoveryFromDB()

func (*VirtualChain) SetLogger

func (v *VirtualChain) SetLogger(logger log.Logger)

for test

func (*VirtualChain) Start

func (v *VirtualChain) Start()

func (*VirtualChain) Stop

func (v *VirtualChain) Stop()

func (*VirtualChain) SubscribeChainEvent

func (v *VirtualChain) SubscribeChainEvent(ch chan<- evmtypes.ChainEvent) event.Subscription

func (*VirtualChain) SubscribeLogsEvent

func (v *VirtualChain) SubscribeLogsEvent(ch chan<- []*gethtypes.Log) event.Subscription

Jump to

Keyboard shortcuts

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