Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockStats ¶
type BlockStats struct { Index types.ChainIndex `json:"index"` TotalSupply types.Currency `json:"totalSupply"` CirculatingSupply types.Currency `json:"circulatingSupply"` SiafundPool types.Currency `json:"siafundPool"` ActiveContractCount uint64 `json:"activeContractCount"` }
BlockStats aggregates stats as of a given block.
type ConsensusSubscriber ¶
type ConsensusSubscriber interface {
ConsensusSetSubscribe(modules.ConsensusSetSubscriber, modules.ConsensusChangeID, <-chan struct{}) error
}
A ConsensusSubscriber subscribes to consensus changes.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
A Provider indexes stats on the current state of the Sia network.
func NewProvider ¶
func NewProvider(cs ConsensusSubscriber, log *zap.Logger) (*Provider, error)
NewProvider creates a new Provider.
func (*Provider) ProcessConsensusChange ¶
func (p *Provider) ProcessConsensusChange(cc modules.ConsensusChange)
ProcessConsensusChange implements modules.ConsensusSetSubscriber.
func (*Provider) Stats ¶
func (p *Provider) Stats() BlockStats
Click to show internal directories.
Click to hide internal directories.