actor

package
v1.6.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2019 License: LGPL-3.0 Imports: 18 Imported by: 32

Documentation

Overview

Package actor privides communication with other actor

Package actor privides communication with other actor

Index

Constants

View Source
const (
	REQ_TIMEOUT    = 5
	ERR_ACTOR_COMM = "[http] Actor comm error: %v"
)

Variables

View Source
var DisableSyncVerifyTx = false

Functions

func AppendTxToPool

func AppendTxToPool(txn *types.Transaction) (ontErrors.ErrCode, string)

append transaction to pool to txpool actor

func ConsensusSrvHalt

func ConsensusSrvHalt() error

halt consensus to consensus actor

func ConsensusSrvStart

func ConsensusSrvStart() error

start consensus to consensus actor

func CurrentBlockHash

func CurrentBlockHash() common.Uint256

CurrentBlockHash from ledger

func GetBlockByHeight

func GetBlockByHeight(height uint32) (*types.Block, error)

GetBlockByHeight from ledger

func GetBlockFromStore

func GetBlockFromStore(hash common.Uint256) (*types.Block, error)

GetBlockFromStore from ledger

func GetBlockHashFromStore

func GetBlockHashFromStore(height uint32) common.Uint256

GetBlockHashFromStore from ledger

func GetConnectionCnt

func GetConnectionCnt() (uint32, error)

GetConnectionCnt from netSever actor

func GetConnectionState

func GetConnectionState() (uint32, error)

GetConnectionState from netSever actor

func GetContractStateFromStore

func GetContractStateFromStore(hash common.Address) (*payload.DeployCode, error)

GetContractStateFromStore from ledger

func GetCurrentBlockHeight

func GetCurrentBlockHeight() uint32

GetCurrentBlockHeight from ledger

func GetEventNotifyByHeight

func GetEventNotifyByHeight(height uint32) ([]*event.ExecuteNotify, error)

GetEventNotifyByHeight from ledger

func GetEventNotifyByTxHash

func GetEventNotifyByTxHash(txHash common.Uint256) (*event.ExecuteNotify, error)

GetEventNotifyByTxHash from ledger

func GetHeaderByHeight

func GetHeaderByHeight(height uint32) (*types.Header, error)

GetHeaderByHeight from ledger

func GetID

func GetID() (uint64, error)

GetID from netSever actor

func GetMerkleProof

func GetMerkleProof(proofHeight uint32, rootHeight uint32) ([]common.Uint256, error)

GetMerkleProof from ledger

func GetNeighborAddrs

func GetNeighborAddrs() []common.PeerAddr

GetNeighborAddrs from netSever actor

func GetNodePort

func GetNodePort() (uint16, error)

GetNodePort from netSever actor

func GetNodeTime

func GetNodeTime() (int64, error)

GetNodeTime from netSever actor

func GetNodeType

func GetNodeType() (uint64, error)

GetNodeType from netSever actor

func GetRelayState

func GetRelayState() (bool, error)

GetRelayState from netSever actor

func GetStorageItem

func GetStorageItem(address common.Address, key []byte) ([]byte, error)

GetStorageItem from ledger

func GetTransaction

func GetTransaction(hash common.Uint256) (*types.Transaction, error)

GetTransaction from ledger

func GetTxFromPool

func GetTxFromPool(hash common.Uint256) (tcomn.TXEntry, error)

GetTxFromPool from txpool actor

func GetTxnCount

func GetTxnCount() ([]uint32, error)

GetTxnCount from txpool actor

func GetTxnWithHeightByTxHash

func GetTxnWithHeightByTxHash(hash common.Uint256) (uint32, *types.Transaction, error)

GetTxnWithHeightByTxHash from ledger

func GetTxsFromPool

func GetTxsFromPool(byCount bool) map[common.Uint256]*types.Transaction

GetTxsFromPool from txpool actor

func GetVersion

func GetVersion() (uint32, error)

GetVersion from netSever actor

func PreExecuteContract

func PreExecuteContract(tx *types.Transaction) (*cstate.PreExecResult, error)

PreExecuteContract from ledger

func SetConsensusPid

func SetConsensusPid(actr *actor.PID)

func SetNetServerPID

func SetNetServerPID(actr *actor.PID)

func SetTxPid

func SetTxPid(actr *actor.PID)

func SetTxnPoolPid

func SetTxnPoolPid(actr *actor.PID)

func SubscribeEvent

func SubscribeEvent(topic string, handler func(v interface{}))

Subscribe save block complete and smartcontract Event

func Xmit

func Xmit(msg interface{}) error

Xmit to netSever actor

Types

type EventActor

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

func (*EventActor) Receive

func (t *EventActor) Receive(c actor.Context)

receive from subscribed actor

Jump to

Keyboard shortcuts

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