actor

package
v1.14.0-beta Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: LGPL-3.0 Imports: 20 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

GetConnectionCnt from netSever actor

func GetContractStateFromStore

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

GetContractStateFromStore from ledger

func GetCrossChainMsg added in v1.9.0

func GetCrossChainMsg(height uint32) (*types.CrossChainMsg, error)

func GetCrossStatesProof added in v1.9.0

func GetCrossStatesProof(height uint32, key []byte) ([]byte, error)

func GetCurrentBlockHeight

func GetCurrentBlockHeight() uint32

GetCurrentBlockHeight from ledger

func GetEthAccount added in v1.14.1

func GetEthAccount(address common2.Address) (*storage.EthAccount, error)

func GetEthCode added in v1.14.1

func GetEthCode(hash common2.Hash) ([]byte, error)

func GetEthStorage added in v1.14.1

func GetEthStorage(addr common2.Address, key common2.Hash) ([]byte, error)

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 GetGasPrice added in v1.14.1

func GetGasPrice() uint64

func GetHeaderByHeight

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

GetHeaderByHeight from ledger

func GetID

func GetID() common.PeerId

GetID from netSever actor

func GetMaxPeerBlockHeight added in v1.8.1

func GetMaxPeerBlockHeight() uint64

GetMaxPeerBlockHeight 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

GetNodePort from netSever actor

func GetNodeType

func GetNodeType() uint64

GetNodeType from netSever actor

func GetRelayState

func GetRelayState() bool

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

GetTxnCount from txpool actor

func GetTxnHashList added in v1.11.0

func GetTxnHashList() []common.Uint256

GetTxnHashList from txpool actor

func GetTxnWithHeightByTxHash

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

GetTxnWithHeightByTxHash from ledger

func GetVersion

func GetVersion() uint32

GetVersion from netSever actor

func PreExecuteContract

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

PreExecuteContract from ledger

func PreExecuteContractBatch added in v1.8.1

func PreExecuteContractBatch(tx []*types.Transaction, atomic bool) ([]*cstate.PreExecResult, uint32, error)

func PreExecuteEip155Tx added in v1.14.1

func PreExecuteEip155Tx(msg types2.Message) (*types3.ExecutionResult, error)

func SetConsensusPid

func SetConsensusPid(actr *actor.PID)

func SetNetServer added in v1.10.0

func SetNetServer(p2p p2p.P2P)

func SetTxPoolService added in v1.14.1

func SetTxPoolService(pool tcomn.TxPoolService)

func SetTxnPoolPid

func SetTxnPoolPid(actr *actor.PID)

func SubscribeEvent

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

Subscribe save block complete and smartcontract Event

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