sssync

package
v0.0.0-...-509fca3 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Broadcast func(network.Message) error
}

type Synchronizer

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

func NewSynchronizer

func NewSynchronizer(config *Config, blockchain *blockchain.Blockchain, mempool *mempool.Mempool) *Synchronizer

func (*Synchronizer) HandleBlock

func (sync *Synchronizer) HandleBlock(peer *peer.Peer, message *network.BlockMessage)

func (*Synchronizer) HandleBlockInvVect

func (sync *Synchronizer) HandleBlockInvVect(peer *peer.Peer, invVect *network.InvVect) error

func (*Synchronizer) HandleDisconnectedPeer

func (sync *Synchronizer) HandleDisconnectedPeer(peer *peer.Peer)

func (*Synchronizer) HandleReadyPeer

func (sync *Synchronizer) HandleReadyPeer(peer *peer.Peer)

func (*Synchronizer) OnPoppedBlock

func (sync *Synchronizer) OnPoppedBlock(block *blockchain.Block) error

func (*Synchronizer) OnPushedBlock

func (sync *Synchronizer) OnPushedBlock(block *blockchain.Block) error

func (*Synchronizer) ProcessBlock

func (sync *Synchronizer) ProcessBlock(message *network.BlockMessage)

func (*Synchronizer) Start

func (sync *Synchronizer) Start() error

func (*Synchronizer) Stop

func (sync *Synchronizer) Stop() error

Jump to

Keyboard shortcuts

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