Documentation ¶
Index ¶
- func TrapSignal(cleanupFunc func())
- type ChainLogs
- type VirtualChain
- func (v *VirtualChain) GenerateNewBlock(scanBlock bool)
- func (v *VirtualChain) GetConfirmations(txHash [32]byte) int32
- func (v *VirtualChain) RecoveryFromDB()
- func (v *VirtualChain) SetLogger(logger log.Logger)
- func (v *VirtualChain) Start()
- func (v *VirtualChain) Stop()
- func (v *VirtualChain) SubscribeChainEvent(ch chan<- evmtypes.ChainEvent) event.Subscription
- func (v *VirtualChain) SubscribeLogsEvent(ch chan<- []*gethtypes.Log) event.Subscription
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 (*ChainLogs) RegisterChain ¶
func (a *ChainLogs) RegisterChain(chainName string, chain *VirtualChain)
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) 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
Click to show internal directories.
Click to hide internal directories.