onroad

package
v0.0.3-chain Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2018 License: GPL-3.0 Imports: 19 Imported by: 8

Documentation

Index

Constants

View Source
const (
	Create = iota
	Start
	Stop
)

Variables

View Source
var (
	POMAXPROCS                = runtime.NumCPU()
	CommonFetchSize           = 4 * POMAXPROCS
	ContractTaskProcessorSize = 2 * POMAXPROCS
	ContractFetchSize         = 2 * POMAXPROCS
)
View Source
var (
	ErrNotSyncDone = errors.New("network synchronization is not complete")
)

Functions

This section is empty.

Types

type AutoReceiveWorker

type AutoReceiveWorker struct {
	// contains filtered or unexported fields
}

func NewAutoReceiveWorker

func NewAutoReceiveWorker(manager *Manager, address types.Address, filters map[types.TokenTypeId]big.Int) *AutoReceiveWorker

func (*AutoReceiveWorker) Close

func (w *AutoReceiveWorker) Close() error

func (*AutoReceiveWorker) NewOnroadTxAlarm

func (w *AutoReceiveWorker) NewOnroadTxAlarm()

func (*AutoReceiveWorker) ProcessOneBlock

func (w *AutoReceiveWorker) ProcessOneBlock(sendBlock *ledger.AccountBlock)

func (*AutoReceiveWorker) ResetAutoReceiveFilter

func (w *AutoReceiveWorker) ResetAutoReceiveFilter(filters map[types.TokenTypeId]big.Int)

func (*AutoReceiveWorker) Start

func (w *AutoReceiveWorker) Start()

func (AutoReceiveWorker) Status

func (w AutoReceiveWorker) Status() int

func (*AutoReceiveWorker) Stop

func (w *AutoReceiveWorker) Stop()

type ConsensusReader

type ConsensusReader interface {
	VerifyAccountProducer(block *ledger.AccountBlock) error
}

type ContractTaskProcessor

type ContractTaskProcessor struct {
	// contains filtered or unexported fields
}

func NewContractTaskProcessor

func NewContractTaskProcessor(worker *ContractWorker, index int) *ContractTaskProcessor

func (*ContractTaskProcessor) Close

func (tp *ContractTaskProcessor) Close() error

func (*ContractTaskProcessor) Start

func (tp *ContractTaskProcessor) Start()

func (*ContractTaskProcessor) Status

func (tp *ContractTaskProcessor) Status() int

func (*ContractTaskProcessor) Stop

func (tp *ContractTaskProcessor) Stop()

func (*ContractTaskProcessor) WakeUp

func (tp *ContractTaskProcessor) WakeUp()

type ContractWorker

type ContractWorker struct {
	// contains filtered or unexported fields
}

func NewContractWorker

func NewContractWorker(manager *Manager, accEvent producer.AccountStartEvent) *ContractWorker

func (*ContractWorker) Close

func (w *ContractWorker) Close() error

func (*ContractWorker) NewOnroadTxAlarm

func (w *ContractWorker) NewOnroadTxAlarm()

func (*ContractWorker) Start

func (w *ContractWorker) Start()

func (ContractWorker) Status

func (w ContractWorker) Status() int

func (*ContractWorker) Stop

func (w *ContractWorker) Stop()

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(vite Vite, dataDir string) *Manager

func (*Manager) Close

func (manager *Manager) Close() error

func (*Manager) InitAndStartWork

func (manager *Manager) InitAndStartWork()

func (*Manager) ResetAutoReceiveFilter

func (manager *Manager) ResetAutoReceiveFilter(addr types.Address, filter map[types.TokenTypeId]big.Int)

func (*Manager) StartAutoReceiveWorker

func (manager *Manager) StartAutoReceiveWorker(addr types.Address, filter map[types.TokenTypeId]big.Int) error

func (*Manager) StopAutoReceiveWorker

func (manager *Manager) StopAutoReceiveWorker(addr types.Address) error

type PoolReader

type PoolReader interface {
	ExistInPool(address types.Address, fromBlockHash types.Hash) bool
	AddDirectAccountBlock(address types.Address, vmAccountBlock *vm_context.VmAccountBlock) error
	AddDirectAccountBlocks(address types.Address, received *vm_context.VmAccountBlock, sendBlocks []*vm_context.VmAccountBlock) error
}

type SimpleAutoReceiveFilterPair

type SimpleAutoReceiveFilterPair struct {
	// contains filtered or unexported fields
}

type Vite

type Vite interface {
	Net() *net.Net
	Chain() chain.Chain
	WalletManager() *wallet.Manager
	Producer() producer.Producer
	PoolReader
	ConsensusReader
}

type Worker

type Worker interface {
	Status() int
	Start()
	Stop()
	Close() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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