context

package
v3.8.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PeersInfo

type PeersInfo struct {
	LastLib   uint64
	LastBlock uint64
	Addr      string
	Port      string
	Account   string
	NodeType  string
	ChainId   string
	Version   uint32
	IsActive  bool
}

PeersInfo peersinfo for rest

type ProtocolInstance

type ProtocolInstance interface {
	ProtocolInterface
	Start()
	SetChainActor(tpid *actor.PID)
	SetTrxPreHandleActor(tpid *actor.PID)
	SetConsensusActor(tpid *actor.PID)

	SendNewTrx(notify *message.NotifyTrx)
	SendNewBlock(notify *message.NotifyBlock)
	SendPrevote(notify *message.SendPrevote)
	SendPrecommit(notify *message.SendPrecommit)
	SendCommit(notify *message.SendCommit)
}

type ProtocolInterface

type ProtocolInterface interface {
	GetBlockSyncState() bool
	GetBlockSyncDistance() uint64
	GetPeerInfo() (uint64, []*PeersInfo)
	UpdatePeerStateToActive(addr string) bool
	UpdatePeerStateToInActive(addr string, timeout uint32) bool
	QueryPeerState(addr string) bool
}

Jump to

Keyboard shortcuts

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