proto

package
v0.0.0-...-ec04e22 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProtocolHandler

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

func NewProtocolHandler

func NewProtocolHandler() (*ProtocolHandler, error)

func (*ProtocolHandler) Handle

func (ph *ProtocolHandler) Handle(peer *p2p.Peer) error

func (*ProtocolHandler) SetProtocolManager

func (ph *ProtocolHandler) SetProtocolManager(manager *ProtocolManager)

type ProtocolManager

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

func NewProtocolManager

func NewProtocolManager(config config.Config, blockchain *chain.Blockchain) (*ProtocolManager, error)

func (*ProtocolManager) BroadcastBlock

func (pm *ProtocolManager) BroadcastBlock(block *model.Block) error

func (*ProtocolManager) BroadcastTransaction

func (pm *ProtocolManager) BroadcastTransaction(transaction *model.Transaction) error

func (*ProtocolManager) HandlePeerMessage

func (pm *ProtocolManager) HandlePeerMessage(peer *p2p.Peer) error

func (*ProtocolManager) Start

func (pm *ProtocolManager) Start() error

Jump to

Keyboard shortcuts

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