Documentation
¶
Index ¶
- func CreateDB()
- type Block
- type DB
- func (c *DB) BlockExists(blockNumber uint64) bool
- func (c *DB) GetBlock(blockNumber uint64) (*Block, error)
- func (c *DB) GetBlockFromCache(blockNumber uint64) (*Block, error)
- func (c *DB) GetData(timeBegin uint64, timeEnd uint64) []*Tx
- func (c *DB) GetLatestTransactions() (*TxsByMinutes, []*Tx)
- func (c *DB) GetState() (dbState *DbState)
- func (c *DB) GroupByMinutes(beginDT uint64, endDT uint64, txs []*Tx) *TxsByMinutes
- func (c *DB) LatestBlockNumber() uint64
- func (c *DB) LoadExistingBlocks()
- func (c *DB) SaveBlock(b *Block) error
- func (c *DB) Start()
- func (c *DB) Stop()
- type DbState
- type DbStateBlockRange
- type Tx
- type TxsByMinute
- type TxsByMinutes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
var Instance *DB
func (*DB) BlockExists ¶
func (*DB) GetLatestTransactions ¶
func (c *DB) GetLatestTransactions() (*TxsByMinutes, []*Tx)
func (*DB) GroupByMinutes ¶
func (c *DB) GroupByMinutes(beginDT uint64, endDT uint64, txs []*Tx) *TxsByMinutes
func (*DB) LatestBlockNumber ¶
func (*DB) LoadExistingBlocks ¶
func (c *DB) LoadExistingBlocks()
type DbStateBlockRange ¶
type Tx ¶
type Tx struct { BlNumber uint64 `json:"bl_n"` BlDT uint64 `json:"bl_dt"` TxFrom string `json:"tx_from"` TxTo string `json:"tx_to"` TxValue *big.Int `json:"tx_value"` TxValueFloat float64 `json:"tx_value_float"` TxValid bool `json:"tx_valid"` TxStatus uint64 `json:"tx_status"` TxGasUsed uint64 `json:"tx_gas_used"` TxNewContract string `json:"tx_new_contract"` TxDataMethod []byte `json:"tx_data_method"` TxDataP1 []byte `json:"tx_data_p1"` TxDataP2 []byte `json:"tx_data_p2"` TxDataP3 []byte `json:"tx_data_p3"` TxDataP4 []byte `json:"tx_data_p4"` }
type TxsByMinute ¶
type TxsByMinutes ¶
type TxsByMinutes struct {
Items []*TxsByMinute
}
Click to show internal directories.
Click to hide internal directories.