database

package
v0.0.0-...-be1bc29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2020 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Pool *redis.Pool

Functions

func GetBlockEntries

func GetBlockEntries() (blocks []types.BlockEntry, err error)

GetBlockEntries returns the 20 most recent blocks with short TXIDs.

func GetHistorical

func GetHistorical(timeframe int, by string) (hmds []types.HistoricalMempoolData, err error)

func GetMempool

func GetMempool() (timestamp time.Time, feerateMapJSON string, megabyteMarkersJSON string, mempoolSize int, err error)

GetMempool gets the current mempool from the database

func GetMempoolEntries

func GetMempoolEntries() (mes []types.MempoolEntry, err error)

GetMempoolEntries gets the last x mempool Entries from the database

func GetMempoolEntriesCache

func GetMempoolEntriesCache() (mesJSON string, err error)

GetMempoolEntriesCache GET the cached response of a recent GetMempoolEntries() call

func GetRecentBlocks

func GetRecentBlocks() (blocks []types.RecentBlock, err error)

GetRecentBlocks returns the 10 most recent blocks.

func GetRecentFeerateAPIEntries

func GetRecentFeerateAPIEntries() (entries []types.FeeRateAPIEntry, err error)

GetRecentFeerateAPIEntries returns the recent feeRate API entries from Redis

func GetTransactionStats

func GetTransactionStats() (tss []types.TransactionStat, err error)

GetTransactionStats gets the Transaction Stats data from the database

func SetMempoolEntriesCache

func SetMempoolEntriesCache(mesJSON string) (err error)

SetMempoolEntriesCache SETs the response of a recent GetMempoolEntries() as a cache

func SetupDatabase

func SetupDatabase() error

Types

type MempoolState

type MempoolState struct {
	Timestamp int64 `json:"timestamp"`

	DataInBuckets []float64 `json:"dataInBuckets"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL