synchronizer

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Synchronizer

type Synchronizer struct {
	hotstuff.LeaderRotation
	// contains filtered or unexported fields
}

Synchronizer is a dumb implementation of the hotstuff.ViewSynchronizer interface. It does not do anything to ensure synchronization, it simply makes the local replica propose at the correct time, and send new view messages in case of a timeout.

func New

func New(leaderRotation hotstuff.LeaderRotation, initialTimeout time.Duration) *Synchronizer

New creates a new Synchronizer.

func (*Synchronizer) Init

func (s *Synchronizer) Init(hs hotstuff.Consensus)

Init initializes the synchronizer with given the hotstuff instance.

func (*Synchronizer) OnFinishQC

func (s *Synchronizer) OnFinishQC()

OnFinishQC should be called when a replica has created a new qc.

func (*Synchronizer) OnNewView

func (s *Synchronizer) OnNewView()

OnNewView should be called when a replica receives a valid NewView message.

func (*Synchronizer) OnPropose

func (s *Synchronizer) OnPropose()

OnPropose should be called when a replica has received a new valid proposal.

func (*Synchronizer) Start

func (s *Synchronizer) Start()

Start starts the synchronizer.

func (*Synchronizer) Stop

func (s *Synchronizer) Stop()

Stop stops the synchronizer.

Jump to

Keyboard shortcuts

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