proc

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: LGPL-3.0 Imports: 23 Imported by: 11

Documentation

Overview

Package proc provides functions for handle messages from consensus/ledger/net/http/validators

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TXPoolServer

type TXPoolServer struct {
	Net p2p.P2P
	// contains filtered or unexported fields
}

TXPoolServer contains all api to external modules

func NewTxPoolServer

func NewTxPoolServer(num uint8, disablePreExec, disableBroadcastNetTx bool) *TXPoolServer

NewTxPoolServer creates a new tx pool server to schedule workers to handle and filter inbound transactions from the network, http, and consensus.

func (*TXPoolServer) GetPID

func (s *TXPoolServer) GetPID(actor tc.ActorType) *actor.PID

GetPID returns an actor pid with the actor type, If the type doesn't exist, return nil.

func (*TXPoolServer) RegisterActor

func (s *TXPoolServer) RegisterActor(actor tc.ActorType, pid *actor.PID)

RegisterActor registers an actor with the actor type and pid.

func (*TXPoolServer) Stop

func (s *TXPoolServer) Stop()

Stop stops server and workers.

func (*TXPoolServer) UnRegisterActor

func (s *TXPoolServer) UnRegisterActor(actor tc.ActorType)

UnRegisterActor cancels the actor with the actor type.

type TxActor

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

TxnActor: Handle the low priority msg from P2P and API

func NewTxActor

func NewTxActor(s *TXPoolServer) *TxActor

NewTxActor creates an actor to handle the transaction-based messages from network and http

func (*TxActor) Receive

func (ta *TxActor) Receive(context actor.Context)

Receive implements the actor interface

type TxPoolActor

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

TxnPoolActor: Handle the high priority request from Consensus

func NewTxPoolActor

func NewTxPoolActor(s *TXPoolServer) *TxPoolActor

NewTxPoolActor creates an actor to handle the messages from the consensus

func (*TxPoolActor) Receive

func (tpa *TxPoolActor) Receive(context actor.Context)

Receive implements the actor interface

type VerifyRspActor

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

VerifyRspActor: Handle the response from the validators

func NewVerifyRspActor

func NewVerifyRspActor(s *TXPoolServer) *VerifyRspActor

NewVerifyRspActor creates an actor to handle the verified result from validators

func (*VerifyRspActor) Receive

func (vpa *VerifyRspActor) Receive(context actor.Context)

Receive implements the actor interface

Jump to

Keyboard shortcuts

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