2021-07-06 18:39:56 -07:00
|
|
|
package block
|
|
|
|
|
|
|
|
import (
|
2021-09-10 16:23:04 -04:00
|
|
|
"github.com/lbryio/lbcd/chaincfg/chainhash"
|
2021-07-06 18:39:56 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
// Repo defines APIs for Block to access persistence layer.
|
|
|
|
type Repo interface {
|
|
|
|
Load() (int32, error)
|
|
|
|
Set(height int32, hash *chainhash.Hash) error
|
|
|
|
Get(height int32) (*chainhash.Hash, error)
|
|
|
|
Close() error
|
|
|
|
Flush() error
|
|
|
|
}
|