persister

package
v0.23.5 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: AGPL-3.0 Imports: 3 Imported by: 3

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