Documentation ¶
Index ¶
Constants ¶
View Source
const ( TypeTransaction byte = iota TypeBlock TypeBlockHead TypeIPs )
Variables ¶
This section is empty.
Functions ¶
func InitController ¶
Types ¶
type Controller ¶
type Controller struct { Pool *txpool.Pool Miner *miner.Miner BlockChain *blockchain.Blockchain AdvertiseAddr string // contains filtered or unexported fields }
func New ¶
func New(pool *txpool.Pool, blockChain *blockchain.Blockchain, miner *miner.Miner, logger *zap.Logger, AdvertiseAddr string, initBits uint32) (*Controller, error)
func (*Controller) HandleBlockHeadMessage ¶
func (c *Controller) HandleBlockHeadMessage(msg []byte) error
func (*Controller) HandleIPsMessage ¶
func (c *Controller) HandleIPsMessage(msg []byte) error
func (*Controller) HandleTransactionMessage ¶
func (c *Controller) HandleTransactionMessage(msg []byte) error
func (*Controller) RegisterHandleFunc ¶
func (c *Controller) RegisterHandleFunc() func([]byte) error
Click to show internal directories.
Click to hide internal directories.