electoral

package
v0.0.0-...-168a7d3 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const KPingTimeout = 10 * time.Second
View Source
const MessagePrefix = byte('v')

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnState

type ConnState struct {
	BestBlockIndex uint64
	OwnerAddress   common.Address
	PID            string
	RTT            time.Duration
}

type EleRet

type EleRet struct {
	PackBlockIndex uint64
	PackerPeerID   string
}

type MemServices

type MemServices interface {
	UpdateVote(electoral *im.Electoral)

	UpdatePingRet(pret *node.PingRet)

	GetOnlineSuperNodes() []string

	GetNodesPingStates() []*ConnState

	GetNearestOnlineNode(bindex uint64) *im.Node

	FightPacker(ctx context.Context) (*EleRet, error)

	LatestPacker() *EleRet
}

func CreateServices

func CreateServices(cvfs vdb.CVFS, exptime int64) MemServices

Jump to

Keyboard shortcuts

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