dpos

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2019 License: MIT Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDposNetwork

func NewDposNetwork(pid peer.PID, listener manager.NetworkEventListener,
	dposAccount account.DposAccount) (*network, error)

Types

type Arbitrator

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

func NewArbitrator

func NewArbitrator(password []byte, cfg Config) (*Arbitrator, error)

func (*Arbitrator) GetArbiterPeersInfo added in v0.3.0

func (a *Arbitrator) GetArbiterPeersInfo() []*dposp2p.PeerInfo

func (*Arbitrator) OnBlockReceived added in v0.3.0

func (a *Arbitrator) OnBlockReceived(b *types.Block, confirmed bool)

func (*Arbitrator) OnConfirmReceived added in v0.3.0

func (a *Arbitrator) OnConfirmReceived(p *payload.Confirm)

func (*Arbitrator) OnIllegalBlockTxReceived added in v0.3.0

func (a *Arbitrator) OnIllegalBlockTxReceived(p *payload.DPOSIllegalBlocks)

func (*Arbitrator) OnInactiveArbitratorsTxReceived added in v0.3.0

func (a *Arbitrator) OnInactiveArbitratorsTxReceived(
	p *payload.InactiveArbitrators)

func (*Arbitrator) OnPeersChanged added in v0.3.0

func (a *Arbitrator) OnPeersChanged(arbiters map[string]*dposp2p.PeerAddr)

func (*Arbitrator) OnSidechainIllegalEvidenceReceived added in v0.3.0

func (a *Arbitrator) OnSidechainIllegalEvidenceReceived(
	data *payload.SidechainIllegalData)

func (*Arbitrator) Recover added in v0.3.0

func (a *Arbitrator) Recover()

func (*Arbitrator) Start

func (a *Arbitrator) Start()

func (*Arbitrator) Stop

func (a *Arbitrator) Stop() error

type Config added in v0.3.0

type Config struct {
	EnableEventLog    bool
	EnableEventRecord bool
	Params            config.ArbiterConfiguration
	Arbitrators       state.Arbitrators
	Store             store.IDposStore
	TxMemPool         *mempool.TxPool
	BlockMemPool      *mempool.BlockPool
	ChainParams       *config.Params
	Broadcast         func(msg p2p.Message)
}

type PeerItem

type PeerItem struct {
	Address     p2p.PeerAddr
	NeedConnect bool
	Peer        *peer.Peer
}

Directories

Path Synopsis
p2p
msg

Jump to

Keyboard shortcuts

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