Documentation ¶
Index ¶
- func GetHeight(d *dvotedb.BadgerDB, key string, def int64) *voctypes.Height
- func GetHeightMap(d *dvotedb.BadgerDB, key string) *voctypes.HeightMap
- func GetInt64(d *dvotedb.BadgerDB, key string) int64
- func ListItemsByHeight(d *dvotedb.BadgerDB, max, height int, prefix []byte) [][]byte
- func SearchBlocksByValidator(d *dvotedb.BadgerDB, max int, term, validator string) [][]byte
- func SearchItems(d *dvotedb.BadgerDB, max int, term string, prefix []byte) [][]byte
- func SearchKeys(d *dvotedb.BadgerDB, max int, term string, prefix []byte) [][]byte
- type BlockState
- type ExplorerDB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHeightMap ¶
GetHeightMap fetches a height map from the database
func ListItemsByHeight ¶
ListItemsByHeight returns a list of items given integer keys
func SearchBlocksByValidator ¶
SearchBlocksByValidator returns a list of blocks given the search term and validator
func SearchItems ¶
SearchItems returns a list of items given search term, starting with given prefix
Types ¶
type BlockState ¶
type BlockState struct {
// contains filtered or unexported fields
}
type ExplorerDB ¶
type ExplorerDB struct { Db *dvotedb.BadgerDB Vs *vochain.VochainService }
func NewDB ¶
func NewDB(cfg *config.MainCfg) *ExplorerDB
NewDB initializes a badger database at the given path
func (*ExplorerDB) UpdateDB ¶
func (d *ExplorerDB) UpdateDB()
UpdateDB continuously updates the database by calling dvote & tendermint apis
Click to show internal directories.
Click to hide internal directories.