syncer

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2019 License: Apache-2.0 Imports: 8 Imported by: 3

README

syncer

A realtime sync program, used to quickly sync block/transaction from other nodes

Build Status codecov

Getting started

Running it then should be as simple as:

$ make all
Testing
$ make test

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockSyncer

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

BlockSyncer block synchronize program

func NewBlockSyncer

func NewBlockSyncer(p2p p2p.P2PAPI, sendChan chan<- interface{}, eventCenter types.EventCenter) (*BlockSyncer, error)

NewBlockSyncer create block syncer instance.

func (*BlockSyncer) GatherNewBlockFunc added in v1.0.0

func (syncer *BlockSyncer) GatherNewBlockFunc(msg interface{})

GatherNewBlockFunc gather new block from p2p network.

func (*BlockSyncer) Start

func (syncer *BlockSyncer) Start() error

Start star block syncer

func (*BlockSyncer) Stop

func (syncer *BlockSyncer) Stop()

Stop stop block syncer

type BlockSyncerAPI

type BlockSyncerAPI interface {
	// Start star block syncer
	Start() error
	// Stop stop block syncer
	Stop()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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