Versions in this module Expand all Collapse all v4 v4.0.0 Sep 3, 2021 Changes in this version + func DisableLog() + func UseLogger(logger slog.Logger) + type AgendaDB struct + func NewAgendasDB(client DeploymentSource, dbPath string) (*AgendaDB, error) + func (db *AgendaDB) AgendaInfo(agendaID string) (*AgendaTagged, error) + func (db *AgendaDB) AllAgendas() (agendas []*AgendaTagged, err error) + func (db *AgendaDB) Close() error + func (db *AgendaDB) UpdateAgendas() error + type AgendaSummary struct + Abstain uint32 + AbstainRate float32 + Approval float32 + Aye uint32 + Description string + FailThreshold float32 + ID string + IsActive bool + IsDefined bool + IsFailed bool + IsLocked bool + IsLosing bool + IsVoting bool + IsWinning bool + LockCount uint32 + Nay uint32 + PassThreshold float32 + Quorum uint32 + QuorumAchieved bool + QuorumProgress float32 + VoteCount uint32 + VotingTriggered bool + type AgendaTagged struct + Choices []chainjson.Choice + Description string + ExpireTime uint64 + ID string + Mask uint16 + QuorumProgress float64 + StartTime uint64 + Status dbtypes.AgendaStatusType + VoteVersion uint32 + type DeploymentSource interface + GetVoteInfo func(ctx context.Context, version uint32) (*chainjson.GetVoteInfoResult, error) + type VoteDataSource interface + GetStakeVersionInfo func(context.Context, int32) (*chainjson.GetStakeVersionInfoResult, error) + GetStakeVersions func(context.Context, string, int32) (*chainjson.GetStakeVersionsResult, error) + GetVoteInfo func(context.Context, uint32) (*chainjson.GetVoteInfoResult, error) + type VoteSummary struct + Agendas []AgendaSummary + Hash string + Height int64 + MinerCount uint32 + MinerProgress float32 + MinerThreshold float32 + NetworkUpgraded bool + NewMiners uint32 + NewVoters uint32 + NextRCIHeight uint32 + OldMiners uint32 + OldVoters uint32 + RCIBlocks uint32 + RCIMined uint32 + RCIProgress float32 + SVIBlocks uint32 + SVIMined uint32 + SVIProgress float32 + TilNextRCI int64 + Version uint32 + VoteVersion uint32 + VoterCount uint32 + VoterProgress float32 + VoterThreshold float32 + VotingTriggered bool + type VoteTracker struct + func NewVoteTracker(params *chaincfg.Params, node VoteDataSource, counter voteCounter) (*VoteTracker, error) + func (tracker *VoteTracker) Refresh() + func (tracker *VoteTracker) Summary() *VoteSummary + func (tracker *VoteTracker) Version() uint32 Other modules containing this package github.com/decred/dcrdata/gov github.com/decred/dcrdata/gov/v2 github.com/decred/dcrdata/gov/v3 github.com/decred/dcrdata/gov/v5 github.com/decred/dcrdata/v4