chainactor

package
v3.8.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChainActorPid *actor.PID

ChainActorPid is chain actor pid

View Source
var NetActorPid *actor.PID

Functions

func BroadCastBlock

func BroadCastBlock(block *types.Block)

func NewChainActor

func NewChainActor(env *env.ActorEnv) *actor.PID

NewChainActor spawn a named actor

func SetNetActorPid

func SetNetActorPid(pid *actor.PID)

SetNetActorPid set trx actor pid

func SetTrxPoolActorPid

func SetTrxPoolActorPid(tpid *actor.PID)

SetTrxActorPid set trx actor pid

Types

type ChainActor

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

ChainActor is actor props

func ContructChainActor

func ContructChainActor() *ChainActor

ContructChainActor new and actor

func (*ChainActor) HandleNewProducedBlock

func (c *ChainActor) HandleNewProducedBlock(ctx actor.Context, req *message.InsertBlockReq)

HandleNewProducedBlock new block msg

func (*ChainActor) HandleQueryBlockReq

func (c *ChainActor) HandleQueryBlockReq(ctx actor.Context, req *message.QueryBlockReq)

HandleQueryBlockReq query block

func (*ChainActor) HandleQueryChainInfoReq

func (c *ChainActor) HandleQueryChainInfoReq(ctx actor.Context, req *message.QueryChainInfoReq)

HandleQueryChainInfoReq query chain info

func (*ChainActor) HandleQueryTrxReq

func (c *ChainActor) HandleQueryTrxReq(ctx actor.Context, req *message.QueryTrxReq)

HandleQueryTrxReq query trx

func (*ChainActor) HandleReceiveBlock

func (c *ChainActor) HandleReceiveBlock(ctx actor.Context, req *message.ReceiveBlock)

HandleReceiveBlock receive block

func (*ChainActor) Receive

func (c *ChainActor) Receive(context actor.Context)

Receive process chain msg

Jump to

Keyboard shortcuts

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