Versions in this module Expand all Collapse all v7 v7.0.0 Jun 22, 2022 Changes in this version + func DisableLog() + func JSONFormatBlockData(data *BlockData) (*bytes.Buffer, error) + func NewChainMonitor(ctx context.Context, collector *Collector, savers []BlockDataSaver, ...) *chainMonitor + func UseLogger(logger slog.Logger) + type BlockData struct + BlockchainInfo *chainjson.GetBlockChainInfoResult + Connections int32 + CurrentStakeDiff chainjson.GetStakeDifficultyResult + EstStakeDiff chainjson.EstimateStakeDiffResult + ExtraInfo apitypes.BlockExplorerExtraInfo + FeeInfo chainjson.FeeInfoBlock + Header chainjson.GetBlockHeaderVerboseResult + IdxBlockInWindow int + PoolInfo *apitypes.TicketPoolInfo + PriceWindowNum int + WinningTickets []string + func (b *BlockData) ToBlockExplorerSummary() apitypes.BlockExplorerBasic + func (b *BlockData) ToBlockSummary() apitypes.BlockDataBasic + func (b *BlockData) ToStakeInfoExtended() apitypes.StakeInfoExtended + func (b *BlockData) ToStakeInfoExtendedEstimates() apitypes.StakeInfoExtendedEstimates + type BlockDataSaver interface + Store func(*BlockData, *wire.MsgBlock) error + type BlockDataToJSONFiles struct + func NewBlockDataToJSONFiles(folder string, fileBase string, m ...*sync.Mutex) *BlockDataToJSONFiles + func (s *BlockDataToJSONFiles) Store(data *BlockData, _ *wire.MsgBlock) error + type BlockDataToJSONStdOut struct + func NewBlockDataToJSONStdOut(m ...*sync.Mutex) *BlockDataToJSONStdOut + func (s *BlockDataToJSONStdOut) Store(data *BlockData, _ *wire.MsgBlock) error + type BlockDataToSummaryStdOut struct + func NewBlockDataToSummaryStdOut(sdiffWinSize int64, m ...*sync.Mutex) *BlockDataToSummaryStdOut + func (s *BlockDataToSummaryStdOut) Store(data *BlockData, _ *wire.MsgBlock) error + type BlockTrigger struct + Async bool + Saver func(string, uint32) error + func (s BlockTrigger) Store(bd *BlockData, _ *wire.MsgBlock) error + type Collector struct + func NewCollector(dcrdChainSvr NodeClient, params *chaincfg.Params, ...) *Collector + func (t *Collector) Collect() (*BlockData, *wire.MsgBlock, error) + func (t *Collector) CollectAPITypes(hash *chainhash.Hash) (*apitypes.BlockDataBasic, *apitypes.StakeInfoExtended) + func (t *Collector) CollectBlockInfo(hash *chainhash.Hash) (*apitypes.BlockDataBasic, *chainjson.FeeInfoBlock, ...) + func (t *Collector) CollectHash(hash *chainhash.Hash) (*BlockData, *wire.MsgBlock, error) + type NodeClient interface + EstimateStakeDiff func(ctx context.Context, tickets *uint32) (*chainjson.EstimateStakeDiffResult, error) + GetBlock func(ctx context.Context, blockHash *chainhash.Hash) (*wire.MsgBlock, error) + GetBlockChainInfo func(ctx context.Context) (*chainjson.GetBlockChainInfoResult, error) + GetBlockCount func(ctx context.Context) (int64, error) + GetBlockHeaderVerbose func(ctx context.Context, hash *chainhash.Hash) (*chainjson.GetBlockHeaderVerboseResult, error) + GetBlockSubsidy func(ctx context.Context, height int64, voters uint16) (*chainjson.GetBlockSubsidyResult, error) + GetCoinSupply func(ctx context.Context) (dcrutil.Amount, error) + GetConnectionCount func(ctx context.Context) (int64, error) + GetStakeDifficulty func(ctx context.Context) (*chainjson.GetStakeDifficultyResult, error) Other modules containing this package github.com/decred/dcrdata github.com/decred/dcrdata/blockdata github.com/decred/dcrdata/blockdata/v4 github.com/decred/dcrdata/blockdata/v5 github.com/decred/dcrdata/v3 github.com/decred/dcrdata/v4 github.com/decred/dcrdata/v6