Documentation ¶
Index ¶
- Constants
- Variables
- type AutoReceiveWorker
- func (w *AutoReceiveWorker) Close() error
- func (w AutoReceiveWorker) GetEntropystore() string
- func (w *AutoReceiveWorker) NewOnroadTxAlarm()
- func (w *AutoReceiveWorker) ProcessOneBlock(sendBlock *ledger.AccountBlock)
- func (w *AutoReceiveWorker) ResetAutoReceiveFilter(filters map[types.TokenTypeId]big.Int)
- func (w AutoReceiveWorker) ResetPowDifficulty(powDifficulty *big.Int)
- func (w *AutoReceiveWorker) Start()
- func (w AutoReceiveWorker) Status() int
- func (w *AutoReceiveWorker) Stop()
- type ContractTaskProcessor
- type ContractWorker
- func (w *ContractWorker) Close() error
- func (w *ContractWorker) GetPledgeQuota(addr types.Address) uint64
- func (w *ContractWorker) GetPledgeQuotas(beneficialList []types.Address) map[types.Address]uint64
- func (w *ContractWorker) NewOnroadTxAlarm()
- func (w *ContractWorker) Start(accEvent producerevent.AccountStartEvent)
- func (w ContractWorker) Status() int
- func (w *ContractWorker) Stop()
- type Manager
- func (manager Manager) Chain() chain.Chain
- func (manager *Manager) Close() error
- func (manager Manager) DbAccess() *model.UAccess
- func (manager Manager) GetOnroadBlocksPool() *model.OnroadBlocksPool
- func (manager *Manager) Init(chain chain.Chain)
- func (manager Manager) ListWorkingAutoReceiveWorker() []types.Address
- func (manager Manager) Net() Net
- func (manager Manager) Producer() Producer
- func (manager *Manager) ResetAutoReceiveFilter(addr types.Address, filter map[types.TokenTypeId]big.Int)
- func (manager *Manager) Start()
- func (manager *Manager) StartAutoReceiveWorker(entropystore string, addr types.Address, filter map[types.TokenTypeId]big.Int, ...) error
- func (manager *Manager) Stop()
- func (manager *Manager) StopAutoReceiveWorker(addr types.Address) error
- type Net
- type Pool
- type Producer
- type SimpleAutoReceiveFilterPair
- type Worker
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 (*AutoReceiveWorker) Close ¶
func (w *AutoReceiveWorker) Close() error
func (AutoReceiveWorker) GetEntropystore ¶
func (w AutoReceiveWorker) GetEntropystore() string
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) ResetPowDifficulty ¶ added in v1.2.0
func (w AutoReceiveWorker) ResetPowDifficulty(powDifficulty *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 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) *ContractWorker
func (*ContractWorker) Close ¶
func (w *ContractWorker) Close() error
func (*ContractWorker) GetPledgeQuota ¶ added in v1.3.0
func (w *ContractWorker) GetPledgeQuota(addr types.Address) uint64
func (*ContractWorker) GetPledgeQuotas ¶ added in v1.3.0
func (*ContractWorker) NewOnroadTxAlarm ¶
func (w *ContractWorker) NewOnroadTxAlarm()
func (*ContractWorker) Start ¶
func (w *ContractWorker) Start(accEvent producerevent.AccountStartEvent)
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 (Manager) GetOnroadBlocksPool ¶
func (manager Manager) GetOnroadBlocksPool() *model.OnroadBlocksPool
func (Manager) ListWorkingAutoReceiveWorker ¶
func (*Manager) ResetAutoReceiveFilter ¶
func (*Manager) StartAutoReceiveWorker ¶
type Pool ¶
type Pool 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 Producer ¶
type Producer interface {
SetAccountEventFunc(func(producerevent.AccountEvent))
}
type SimpleAutoReceiveFilterPair ¶
type SimpleAutoReceiveFilterPair struct {
// contains filtered or unexported fields
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.