rdpos

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidViewChangeMsg is the error that ViewChangeMsg is invalid
	ErrInvalidViewChangeMsg = errors.New("ViewChangeMsg is invalid")
)

Functions

func NewProposerRotation

func NewProposerRotation(r *RDPoS) *routine.RecurringTask

NewProposerRotation creates a recurring task of proposer rotation.

Types

type DNet

type DNet interface {
	Tell(node net.Addr, msg proto.Message) error
	Self() net.Addr
	Broadcast(msg proto.Message) error
}

DNet is the delegate networks interface.

type RDPoS

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

RDPoS is the RDPoS consensus scheme

func NewRDPoS

NewRDPoS creates a RDPoS struct

func (*RDPoS) Handle

func (n *RDPoS) Handle(m proto.Message) error

Handle handles incoming messages and publish to the channel.

func (*RDPoS) Start

func (n *RDPoS) Start() error

Start initialize the RDPoS and start to consume requests from request channel.

func (*RDPoS) Stop

func (n *RDPoS) Stop() error

Stop stops the RDPoS and stop consuming requests from request channel.

Jump to

Keyboard shortcuts

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