node

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockAction added in v0.6.0

func BlockAction(services services.Services, mess peer.ProtoMessage, fsm state_fsm.FSM) (state_fsm.FSM, state_fsm.Async, error)

func BlockIdsAction added in v0.6.0

func BlockIdsAction(_ services.Services, mess peer.ProtoMessage, fsm state_fsm.FSM) (state_fsm.FSM, state_fsm.Async, error)

func GetBlockAction added in v0.6.0

func GetBlockAction(services services.Services, mess peer.ProtoMessage, fsm state_fsm.FSM) (state_fsm.FSM, state_fsm.Async, error)

func GetBlockIdsAction added in v0.6.0

func GetBlockIdsAction(services services.Services, mess peer.ProtoMessage, fsm state_fsm.FSM) (state_fsm.FSM, state_fsm.Async, error)

func GetPeersAction added in v0.6.0

func GetPeersAction(services services.Services, mess peer.ProtoMessage, fsm state_fsm.FSM) (state_fsm.FSM, state_fsm.Async, error)

func GetSignaturesAction added in v0.6.0

func GetSignaturesAction(services services.Services, mess peer.ProtoMessage, fsm state_fsm.FSM) (state_fsm.FSM, state_fsm.Async, error)

GetSignaturesAction replies to signature requests

func MaybeEnableExtendedApi added in v0.5.0

func MaybeEnableExtendedApi(state state.State, time types.Time) error

func MicroBlockAction added in v0.6.0

func MicroBlockAction(services services.Services, mess peer.ProtoMessage, fsm state_fsm.FSM) (state_fsm.FSM, state_fsm.Async, error)

func MicroBlockInvAction added in v0.6.0

func MicroBlockInvAction(_ services.Services, mess peer.ProtoMessage, fsm state_fsm.FSM) (state_fsm.FSM, state_fsm.Async, error)

MicroBlockInvAction handles notification about new microblock.

func MicroBlockRequestAction added in v0.6.0

func MicroBlockRequestAction(services services.Services, mess peer.ProtoMessage, fsm state_fsm.FSM) (state_fsm.FSM, state_fsm.Async, error)

MicroBlockRequestAction handles microblock requests.

func PBBlockAction added in v0.6.0

PBBlockAction handles protobuf block message.

func PBMicroBlockAction added in v0.6.0

func PBMicroBlockAction(_ services.Services, mess peer.ProtoMessage, fsm state_fsm.FSM) (state_fsm.FSM, state_fsm.Async, error)

func PBTransactionAction added in v0.8.8

func PBTransactionAction(_ services.Services, mess peer.ProtoMessage, fsm state_fsm.FSM) (state_fsm.FSM, state_fsm.Async, error)

PBTransactionAction handles protobuf transaction message.

func PeersAction added in v0.8.0

func PeersAction(services services.Services, mess peer.ProtoMessage, fsm state_fsm.FSM) (state_fsm.FSM, state_fsm.Async, error)

func ScoreAction added in v0.6.0

func SignaturesAction added in v0.6.0

func SignaturesAction(_ services.Services, mess peer.ProtoMessage, fsm state_fsm.FSM) (state_fsm.FSM, state_fsm.Async, error)

SignaturesAction receives requested earlier signatures

func TransactionAction added in v0.6.0

func TransactionAction(s services.Services, mess peer.ProtoMessage, fsm state_fsm.FSM) (state_fsm.FSM, state_fsm.Async, error)

TransactionAction handles new transaction message.

Types

type Action added in v0.6.0

type Action func(services services.Services, mess peer.ProtoMessage, fsm state_fsm.FSM) (state_fsm.FSM, state_fsm.Async, error)

type Config

type Config struct {
	AppName  string
	NodeName string
	Listen   string
	DeclAddr string
}

type Node

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

func NewNode

func NewNode(services services.Services, declAddr proto.TCPAddr, bindAddr proto.TCPAddr, microblockInterval time.Duration) *Node

func (*Node) Close

func (a *Node) Close()

func (*Node) Run added in v0.5.0

func (a *Node) Run(ctx context.Context, p peer.Parent, internalMessageCh <-chan messages.InternalMessage)

func (*Node) SpawnOutgoingConnection

func (a *Node) SpawnOutgoingConnection(ctx context.Context, addr proto.TCPAddr) error

func (*Node) SpawnOutgoingConnections

func (a *Node) SpawnOutgoingConnections(ctx context.Context)

Directories

Path Synopsis
Package state_fsm is a generated GoMock package.
Package state_fsm is a generated GoMock package.
ng

Jump to

Keyboard shortcuts

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