cprovider

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 License: ISC Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainProvider

type ChainProvider struct {
	// StartupTime is the unix timestamp for when the Server that is hosting
	// the RPC Server started.
	StartupTime int64
	ChainCtx    chain.IChainCtx
	ChainParams *chaincfg.Params

	DB database.DB
	// These fields allow the RPC Server to interface with the local block
	// BlockChain data and state.
	TimeSource chaindata.MedianTimeSource

	// TxMemPool defines the transaction memory pool to interact with.
	TxMemPool *mempool.TxPool

	// These fields define any optional indexes the RPC Server can make use
	// of to provide additional data when queried.
	TxIndex       *indexers.TxIndex
	AddrIndex     *indexers.AddrIndex
	CfIndex       *indexers.CfIndex
	OrphanTxIndex *indexers.OrphanTxIndex

	// The fee estimator keeps track of how long transactions are left in
	// the mempool before they are mined into blocks.
	FeeEstimator *mempool.FeeEstimator
	MiningAddrs  []jaxutil.Address

	SigCache    *txscript.SigCache
	HashCache   *txscript.HashCache
	SyncManager *netsync.SyncManager
	// contains filtered or unexported fields
}

func (*ChainProvider) BTC

func (chainProvider *ChainProvider) BTC() *btcd.BlockProvider

func (*ChainProvider) BlkTmplGenerator

func (chainProvider *ChainProvider) BlkTmplGenerator() *mining.BlkTmplGenerator

func (*ChainProvider) BlockChain

func (chainProvider *ChainProvider) BlockChain() *blockchain.BlockChain

func (*ChainProvider) BlockTemplate

func (chainProvider *ChainProvider) BlockTemplate(useCoinbaseValue bool, burnReward int) (mining.BlockTemplate, error)

func (*ChainProvider) Config

func (chainProvider *ChainProvider) Config() *ChainRuntimeConfig

func (*ChainProvider) DBUpdateCallback

func (chainProvider *ChainProvider) DBUpdateCallback(tx database.Tx) error

func (*ChainProvider) GbtWorkState

func (chainProvider *ChainProvider) GbtWorkState() *mining.GBTWorkState

func (*ChainProvider) Log

func (chainProvider *ChainProvider) Log() zerolog.Logger

func (*ChainProvider) MiningAddresses

func (chainProvider *ChainProvider) MiningAddresses() []jaxutil.Address

func (*ChainProvider) SetP2PProvider

func (chainProvider *ChainProvider) SetP2PProvider(p2pProvider netsync.PeerNotifier) (err error)

func (*ChainProvider) ShardCount

func (chainProvider *ChainProvider) ShardCount() (uint32, error)

func (*ChainProvider) Stats

func (chainProvider *ChainProvider) Stats() map[string]float64

type ChainRuntimeConfig

type ChainRuntimeConfig struct {
	SigCacheMaxSize    uint     `` /* 154-byte string literal not displayed */
	AddCheckpoints     []string `` /* 132-byte string literal not displayed */
	AddrIndex          bool     `` /* 166-byte string literal not displayed */
	MaxPeers           int      `yaml:"max_peers" toml:"max_peers" long:"maxpeers" description:"Max number of inbound and outbound peers"`
	BlockMaxSize       uint32   `` /* 138-byte string literal not displayed */
	BlockMinSize       uint32   `` /* 138-byte string literal not displayed */
	BlockMaxWeight     uint32   `` /* 137-byte string literal not displayed */
	BlockMinWeight     uint32   `` /* 137-byte string literal not displayed */
	BlockPrioritySize  uint32   `` /* 167-byte string literal not displayed */
	TxIndex            bool     `` /* 174-byte string literal not displayed */
	NoRelayPriority    bool     `` /* 165-byte string literal not displayed */
	RejectReplacement  bool     `` /* 226-byte string literal not displayed */
	RelayNonStd        bool     `` /* 165-byte string literal not displayed */
	FreeTxRelayLimit   float64  `` /* 194-byte string literal not displayed */
	MaxOrphanTxs       int      `` /* 128-byte string literal not displayed */
	MinRelayTxFee      int64    `` /* 157-byte string literal not displayed */
	NoCFilters         bool     `yaml:"no_c_filters" toml:"no_c_filters" long:"nocfilters" description:"Disable committed filtering (CF) support"`
	DisableCheckpoints bool     `` /* 168-byte string literal not displayed */
	MiningAddresses    []string `yaml:"mining_addresses" toml:"mining_addresses"`
	AutoExpand         bool     `yaml:"auto_expand" toml:"auto_expand"`
	ExpansionRule      int32    `yaml:"expansion_rule" toml:"expansion_rule"`
	ExpansionLimit     int32    `yaml:"expansion_limit" toml:"expansion_limit"`
}

func (*ChainRuntimeConfig) ParseMiningAddresses

func (cfg *ChainRuntimeConfig) ParseMiningAddresses(params *chaincfg.Params) ([]jaxutil.Address, error)

Jump to

Keyboard shortcuts

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