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. Persister depends on protocol.State root snapshot bootstrapping to set initial values for SafetyData and LivenessData. These values must be initialized before first use of Persister.
func New ¶
New creates a new Persister using the injected data base to persist relevant hotstuff data.
func (*Persister) GetLivenessData ¶ added in v0.29.0
func (p *Persister) GetLivenessData() (*hotstuff.LivenessData, error)
GetLivenessData will retrieve last persisted liveness data. During normal operations, no errors are expected.
func (*Persister) GetSafetyData ¶ added in v0.29.0
func (p *Persister) GetSafetyData() (*hotstuff.SafetyData, error)
GetSafetyData will retrieve last persisted safety data. During normal operations, no errors are expected.
func (*Persister) PutLivenessData ¶ added in v0.29.0
func (p *Persister) PutLivenessData(livenessData *hotstuff.LivenessData) error
PutLivenessData persists the last liveness data. During normal operations, no errors are expected.
func (*Persister) PutSafetyData ¶ added in v0.29.0
func (p *Persister) PutSafetyData(safetyData *hotstuff.SafetyData) error
PutSafetyData persists the last safety data. During normal operations, no errors are expected.