github.com/koko1123/flow-go-1@v0.29.6/consensus/hotstuff/persister.go (about)

     1  package hotstuff
     2  
     3  // Persister is responsible for persisting state we need to bootstrap after a
     4  // restart or crash.
     5  type Persister interface {
     6  
     7  	// GetStarted will retrieve the last started view.
     8  	GetStarted() (uint64, error)
     9  
    10  	// GetVoted will retrieve the last voted view.
    11  	GetVoted() (uint64, error)
    12  
    13  	// PutStarted persists the last started view.
    14  	PutStarted(view uint64) error
    15  
    16  	// PutVoted persists the last voted view.
    17  	PutVoted(view uint64) error
    18  }