Documentation ¶
Index ¶
- Constants
- type Block
- type IndexerDB
- func (idxdb *IndexerDB) Close()
- func (idxdb *IndexerDB) CloseSendBatch(batch *pgx.Batch)
- func (idxdb *IndexerDB) InitDB()
- func (idxdb *IndexerDB) LatestBlockHeight() (height int64, err error)
- func (idxdb *IndexerDB) QueryMissingBlocks(jobs chan<- int64)
- func (idxdb *IndexerDB) SetBlock(b Block) error
- func (idxdb *IndexerDB) Stats()
Constants ¶
View Source
const ( SetMintEventQuery = `` /* 196-byte string literal not displayed */ SetLivenessEventQuery = `` /* 191-byte string literal not displayed */ SetValidatorIncomeQuery = "" /* 213-byte string literal not displayed */ SetTransferEventQuery = "" /* 197-byte string literal not displayed */ UpdateTransferEventQuery = `UPDATE event_transfer SET sender_address = $1 WHERE height = $2 AND event_index = $3;` )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IndexerDB ¶
IndexerDB is a DB instance containing a pool of connections
func NewIndexerDB ¶
NewIndexerDB returns a new IndexerDB struct
func (*IndexerDB) CloseSendBatch ¶
func (idxdb *IndexerDB) CloseSendBatch(batch *pgx.Batch)
CloseSendBatch submits and closes a batch query. Panics if an error occurs.
func (*IndexerDB) InitDB ¶
func (idxdb *IndexerDB) InitDB()
InitDB parses a connection config string and connects to a postgres idxdb instance
func (*IndexerDB) LatestBlockHeight ¶
LatestBlockHeight returns the highest block height stored in the idxdb
func (*IndexerDB) QueryMissingBlocks ¶
QueryMissingBlocks queries the idxdb for missing block heights between the highest saved block height and block height 1. All missing block heights are added to the queue for indexing
Click to show internal directories.
Click to hide internal directories.