sync

package
v0.9.11 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoError errCode = iota
	ErrTimeExpired
	ErrNoData
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Callback

type Callback interface {
	// contains filtered or unexported methods
}

type Manager

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

func NewSyncManager

func NewSyncManager(db db.Database, nm module.NetworkManager, plt Platform, logger log.Logger) *Manager

func (*Manager) NewSyncer

func (m *Manager) NewSyncer(ah, prh, nrh, vh, ed []byte) Syncer

func (*Manager) OnFailure

func (m *Manager) OnFailure(err error, pi module.ProtocolInfo, b []byte)

func (*Manager) OnJoin

func (m *Manager) OnJoin(id module.PeerID)

func (*Manager) OnLeave

func (m *Manager) OnLeave(id module.PeerID)

func (*Manager) OnReceive

func (m *Manager) OnReceive(pi module.ProtocolInfo, b []byte,
	id module.PeerID) (bool, error)

type Platform added in v0.9.1

type Platform interface {
	NewExtensionWithBuilder(builder merkle.Builder, raw []byte) state.ExtensionSnapshot
}

type Request

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

type Result

type Result struct {
	Wss            state.WorldSnapshot
	PatchReceipts  module.ReceiptList
	NormalReceipts module.ReceiptList
}

type Syncer

type Syncer interface {
	ForceSync() (*Result, error)
	Stop()
	Finalize() error
}

Jump to

Keyboard shortcuts

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