Versions in this module Expand all Collapse all v1 v1.6.14 Mar 23, 2021 v1.6.10 Mar 23, 2021 Changes in this version + var ErrClientQuit = errors.New("client quit") + var ErrRPCNoWallet = &dcrjson.RPCError + var ErrRPCUnimplemented = &dcrjson.RPCError + func UseLogger(logger slog.Logger) + type AddrIndexer interface + EntriesForAddress func(dbTx database.Tx, addr vclutil.Address, numToSkip, numRequested uint32, ...) ([]indexers.TxIndexEntry, uint32, error) + UnconfirmedTxnsForAddress func(addr vclutil.Address) []*vclutil.Tx + type AddrManager interface + LocalAddresses func() []addrmgr.LocalAddr + type BlockTemplater interface + CurrentTemplate func() (*mining.BlockTemplate, error) + ForceRegen func() + Subscribe func() TemplateSubber + UpdateBlockTime func(header *wire.BlockHeader) error + type CPUMiner interface + GenerateNBlocks func(ctx context.Context, n uint32) ([]*chainhash.Hash, error) + HashesPerSecond func() float64 + IsMining func() bool + NumWorkers func() int32 + SetNumWorkers func(numWorkers int32) + type Chain interface + BestSnapshot func() *blockchain.BestState + BlockByHash func(hash *chainhash.Hash) (*vclutil.Block, error) + BlockByHeight func(height int64) (*vclutil.Block, error) + BlockHashByHeight func(height int64) (*chainhash.Hash, error) + BlockHeightByHash func(hash *chainhash.Hash) (int64, error) + CalcNextRequiredStakeDifficulty func() (int64, error) + CalcWantHeight func(interval, height int64) int64 + ChainTips func() []blockchain.ChainTipInfo + ChainWork func(hash *chainhash.Hash) (*big.Int, error) + CheckExpiredTickets func(hashes []chainhash.Hash) []bool + CheckLiveTicket func(hash chainhash.Hash) bool + CheckLiveTickets func(hashes []chainhash.Hash) []bool + CheckMissedTickets func(hashes []chainhash.Hash) []bool + ConvertUtxosToMinimalOutputs func(entry UtxoEntry) []*stake.MinimalOutput + CountVoteVersion func(version uint32) (uint32, error) + EstimateNextStakeDifficulty func(newTickets int64, useMaxTickets bool) (int64, error) + FetchTSpend func(chainhash.Hash) ([]chainhash.Hash, error) + FetchUtxoEntry func(txHash *chainhash.Hash) (UtxoEntry, error) + FetchUtxoStats func() (*blockchain.UtxoStats, error) + GetStakeVersions func(hash *chainhash.Hash, count int32) ([]blockchain.StakeVersions, error) + GetVoteCounts func(version uint32, deploymentID string) (blockchain.VoteCounts, error) + GetVoteInfo func(hash *chainhash.Hash, version uint32) (*blockchain.VoteInfo, error) + HeaderByHash func(hash *chainhash.Hash) (wire.BlockHeader, error) + HeaderByHeight func(height int64) (wire.BlockHeader, error) + HeightRange func(startHeight, endHeight int64) ([]chainhash.Hash, error) + IsCurrent func() bool + IsTreasuryAgendaActive func(*chainhash.Hash) (bool, error) + LiveTickets func() ([]chainhash.Hash, error) + LocateHeaders func(locator blockchain.BlockLocator, hashStop *chainhash.Hash) []wire.BlockHeader + LotteryDataForBlock func(hash *chainhash.Hash) ([]chainhash.Hash, int, [6]byte, error) + MainChainHasBlock func(hash *chainhash.Hash) bool + MaxBlockSize func() (int64, error) + MissedTickets func() ([]chainhash.Hash, error) + NextThresholdState func(hash *chainhash.Hash, version uint32, deploymentID string) (blockchain.ThresholdStateTuple, error) + StateLastChangedHeight func(hash *chainhash.Hash, version uint32, deploymentID string) (int64, error) + TSpendCountVotes func(*chainhash.Hash, *vclutil.Tx) (int64, int64, error) + TicketPoolValue func() (vclutil.Amount, error) + TicketsWithAddress func(address vclutil.Address, isTreasuryEnabled bool) ([]chainhash.Hash, error) + TipGeneration func() ([]chainhash.Hash, error) + TreasuryBalance func(*chainhash.Hash) (*blockchain.TreasuryBalanceInfo, error) + type Clock interface + Now func() time.Time + Since func(t time.Time) time.Duration + type Config struct + AddrIndexer AddrIndexer + AddrManager AddrManager + AllowUnsyncedMining bool + BlockTemplater BlockTemplater + CPUMiner CPUMiner + Chain Chain + ChainParams *chaincfg.Params + Clock Clock + ConnMgr ConnManager + DB database.DB + ExistsAddresser ExistsAddresser + FeeEstimator FeeEstimator + Filterer Filterer + FiltererV2 FiltererV2 + Listeners []net.Listener + LogManager LogManager + MaxProtocolVersion uint32 + MinRelayTxFee vclutil.Amount + MiningAddrs []vclutil.Address + NetInfo []types.NetworksResult + Proxy string + RPCLimitPass string + RPCLimitUser string + RPCMaxClients int + RPCMaxConcurrentReqs int + RPCMaxWebsockets int + RPCPass string + RPCUser string + SanityChecker SanityChecker + Services wire.ServiceFlag + StartupTime int64 + SubsidyCache *standalone.SubsidyCache + SyncMgr SyncManager + TestNet bool + TimeSource blockchain.MedianTimeSource + TxIndexer TxIndexer + TxMempooler TxMempooler + UserAgentVersion string + type ConnManager interface + AddRebroadcastInventory func(iv *wire.InvVect, data interface{}) + AddedNodeInfo func() []Peer + BroadcastMessage func(msg wire.Message) + Connect func(addr string, permanent bool) error + ConnectedCount func() int32 + ConnectedPeers func() []Peer + DisconnectByAddr func(addr string) error + DisconnectByID func(id int32) error + Lookup func(host string) ([]net.IP, error) + NetTotals func() (uint64, uint64) + PersistentPeers func() []Peer + RelayTransactions func(txns []*vclutil.Tx) + RemoveByAddr func(addr string) error + RemoveByID func(id int32) error + type ExistsAddresser interface + ExistsAddress func(addr vclutil.Address) (bool, error) + ExistsAddresses func(addrs []vclutil.Address) ([]bool, error) + type FeeEstimator interface + EstimateFee func(targetConfs int32) (vclutil.Amount, error) + type Filterer interface + FilterByBlockHash func(h *chainhash.Hash, filterType wire.FilterType) ([]byte, error) + FilterHeaderByBlockHash func(h *chainhash.Hash, filterType wire.FilterType) ([]byte, error) + type FiltererV2 interface + FilterByBlockHash func(hash *chainhash.Hash) (*gcs.FilterV2, error) + type LogManager interface + ParseAndSetDebugLevels func(debugLevel string) error + SupportedSubsystems func() []string + type Peer interface + Addr func() string + BanScore func() uint32 + Connected func() bool + ID func() int32 + Inbound func() bool + IsTxRelayDisabled func() bool + LastPingNonce func() uint64 + LocalAddr func() net.Addr + StatsSnapshot func() *peer.StatsSnap + type SanityChecker interface + CheckBlockSanity func(block *vclutil.Block) error + type Server struct + func New(config *Config) (*Server, error) + func (s *Server) NotifyBlockConnected(block *vclutil.Block) + func (s *Server) NotifyBlockDisconnected(block *vclutil.Block) + func (s *Server) NotifyNewTickets(tnd *blockchain.TicketNotificationsData) + func (s *Server) NotifyNewTransactions(txns []*vclutil.Tx) + func (s *Server) NotifyReorganization(rd *blockchain.ReorganizationNtfnsData) + func (s *Server) NotifySpentAndMissedTickets(tnd *blockchain.TicketNotificationsData) + func (s *Server) NotifyStakeDifficulty(stnd *StakeDifficultyNtfnData) + func (s *Server) NotifyTSpend(tx *vclutil.Tx) + func (s *Server) NotifyWinningTickets(wtnd *WinningTicketsNtfnData) + func (s *Server) NotifyWork(templateNtfn *mining.TemplateNtfn) + func (s *Server) RequestedProcessShutdown() <-chan struct{} + func (s *Server) Run(ctx context.Context) + func (s *Server) WebsocketHandler(conn *websocket.Conn, remoteAddr string, authenticated bool, isAdmin bool) + type StakeDifficultyNtfnData struct + BlockHash chainhash.Hash + BlockHeight int64 + StakeDifficulty int64 + type SyncManager interface + IsCurrent func() bool + LocateBlocks func(locator blockchain.BlockLocator, hashStop *chainhash.Hash, maxHashes uint32) []chainhash.Hash + ProcessTransaction func(tx *vclutil.Tx, allowOrphans bool, rateLimit bool, allowHighFees bool, ...) ([]*vclutil.Tx, error) + SubmitBlock func(block *vclutil.Block, flags blockchain.BehaviorFlags) (bool, error) + SyncHeight func() int64 + SyncPeerID func() int32 + TipGeneration func() ([]chainhash.Hash, error) + type TemplateSubber interface + C func() <-chan *mining.TemplateNtfn + Stop func() + type TxIndexer interface + Entry func(hash *chainhash.Hash) (*indexers.TxIndexEntry, error) + type TxMempooler interface + Count func() int + FetchTransaction func(txHash *chainhash.Hash) (*vclutil.Tx, error) + HaveTransactions func(hashes []*chainhash.Hash) []bool + TSpendHashes func() []chainhash.Hash + TxDescs func() []*mempool.TxDesc + VerboseTxDescs func() []*mempool.VerboseTxDesc + type UtxoEntry interface + AmountByIndex func(outputIndex uint32) int64 + BlockHeight func() int64 + IsCoinBase func() bool + IsOutputSpent func(outputIndex uint32) bool + PkScriptByIndex func(outputIndex uint32) []byte + ScriptVersionByIndex func(outputIndex uint32) uint16 + ToUtxoEntry func() *blockchain.UtxoEntry + TransactionType func() stake.TxType + TxVersion func() uint16 + type WinningTicketsNtfnData struct + BlockHash chainhash.Hash + BlockHeight int64 + Tickets []chainhash.Hash