persister

package
v0.22.8-patch-3-fix-co... Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2021 License: AGPL-3.0 Imports: 3 Imported by: 2 modules, 3 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

This section is empty.

Types

type Persister

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

Persister can persist relevant information for hotstuff.

func New

func New(db *badger.DB, chainID flow.ChainID) *Persister

New creates a nev persister using the injected stores to persist relevant hotstuff data.

func (*Persister) GetStarted

func (p *Persister) GetStarted() (uint64, error)

GetStarted returns the last persisted started view.

func (*Persister) GetVoted

func (p *Persister) GetVoted() (uint64, error)

GetVoted returns the last persisted started view.

func (*Persister) PutStarted

func (p *Persister) PutStarted(view uint64) error

PutStarted persists the view when we start it in hotstuff.

func (*Persister) PutVoted

func (p *Persister) PutVoted(view uint64) error

PutVoted persist the view when we voted in hotstuff.

Jump to

Keyboard shortcuts

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