Versions in this module Expand all Collapse all v0 v0.0.2 Aug 30, 2022 Changes in this version + type Builder func(ctx *Context) (Database, error) + type Context struct + Cfg databaseconfig.Config + EncodingConfig *params.EncodingConfig + Logger logging.Logger + func NewContext(cfg databaseconfig.Config, encodingConfig *params.EncodingConfig, ...) *Context + type Database interface + Close func() + GetBlockHeightTimeDayAgo func(now time.Time) (dbtypes.BlockRow, error) + GetBlockHeightTimeHourAgo func(now time.Time) (dbtypes.BlockRow, error) + GetBlockHeightTimeMinuteAgo func(now time.Time) (dbtypes.BlockRow, error) + GetGenesis func() (*types.Genesis, error) + GetLastBlock func() (*dbtypes.BlockRow, error) + GetLastBlockHeight func() (int64, error) + GetTokensPriceID func() ([]string, error) + GetValidatorsDescription func() ([]types.ValidatorDescription, error) + HasBlock func(height int64) (bool, error) + SaveAverageBlockTimeGenesis func(averageTime float64, height int64) error + SaveAverageBlockTimePerDay func(averageTime float64, height int64) error + SaveAverageBlockTimePerHour func(averageTime float64, height int64) error + SaveAverageBlockTimePerMin func(averageTime float64, height int64) error + SaveBlock func(block *types.Block) error + SaveCommitSignatures func(signatures []*types.CommitSig) error + SaveDoubleSignEvidence func(evidence types.DoubleSignEvidence) error + SaveGenesis func(genesis *types.Genesis) error + SaveIBCTransferParams func(params *types.IBCTransferParams) error + SaveInflation func(inflation string, height int64) error + SaveStakingPool func(pool *types.StakingPool) error + SaveSupply func(coins sdk.Coins, height int64) error + SaveToken func(token types.Token) error + SaveTokensPrice func(prices []types.TokenPrice) error + SaveTx func(tx types.TxResponse) error + SaveValidatorCommission func(data []types.ValidatorCommission) error + SaveValidatorDescription func(description []types.ValidatorDescription) error + SaveValidators func(validators []types.Validator) error + SaveValidatorsStatus func(validatorsStatus []types.ValidatorStatus) error + SaveValidatorsVotingPower func(entries []types.ValidatorVotingPower) error + type PruningDb interface + GetLastPruned func() (int64, error) + Prune func(height int64) error + StoreLastPruned func(height int64) error