Documentation ¶
Index ¶
- type AppDB
- func (appDB *AppDB) Close()
- func (appDB *AppDB) GetLastBlockHash() []byte
- func (appDB *AppDB) GetLastBlocksTimeDelta(height uint64) (int, error)
- func (appDB *AppDB) GetLastHeight() uint64
- func (appDB *AppDB) GetStartHeight() uint64
- func (appDB *AppDB) GetValidators() types.ValidatorUpdates
- func (appDB *AppDB) SaveValidators(vals types.ValidatorUpdates)
- func (appDB *AppDB) SetLastBlockHash(hash []byte)
- func (appDB *AppDB) SetLastBlocksTimeDelta(height uint64, delta int)
- func (appDB *AppDB) SetLastHeight(height uint64)
- func (appDB *AppDB) SetStartHeight(height uint64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppDB ¶
type AppDB struct {
// contains filtered or unexported fields
}
AppDB is responsible for storing basic information about app state on disk
func (*AppDB) GetLastBlockHash ¶
GetLastBlockHash returns latest block hash stored on disk
func (*AppDB) GetLastBlocksTimeDelta ¶ added in v0.9.0
GetLastBlocksTimeDelta returns delta of time between latest blocks
func (*AppDB) GetLastHeight ¶
GetLastHeight returns latest block height stored on disk
func (*AppDB) GetStartHeight ¶ added in v0.16.0
GetStartHeight returns start height stored on disk
func (*AppDB) GetValidators ¶
func (appDB *AppDB) GetValidators() types.ValidatorUpdates
GetValidators returns list of latest validators stored on dist
func (*AppDB) SaveValidators ¶
func (appDB *AppDB) SaveValidators(vals types.ValidatorUpdates)
SaveValidators stores given validators list on disk, panics on error
func (*AppDB) SetLastBlockHash ¶
SetLastBlockHash stores given block hash on disk, panics on error
func (*AppDB) SetLastBlocksTimeDelta ¶ added in v0.9.0
SetLastBlocksTimeDelta stores delta of time between latest blocks
func (*AppDB) SetLastHeight ¶
SetLastHeight stores given block height on disk, panics on error
func (*AppDB) SetStartHeight ¶ added in v0.16.0
SetStartHeight stores given block height on disk as start height, panics on error