Documentation ¶
Index ¶
- type ChainProvider
- func (chainProvider *ChainProvider) BTC() *btcd.BlockProvider
- func (chainProvider *ChainProvider) BestSnapshot() *chaindata.BestState
- func (chainProvider *ChainProvider) BlkTmplGenerator() *mining.BlkTmplGenerator
- func (chainProvider *ChainProvider) BlockChain() *blockchain.BlockChain
- func (chainProvider *ChainProvider) BlockTemplate(useCoinbaseValue bool, burnReward int) (chaindata.BlockTemplate, error)
- func (chainProvider *ChainProvider) CalcKForHeight(height int32) uint32
- func (chainProvider *ChainProvider) Config() *ChainRuntimeConfig
- func (chainProvider *ChainProvider) DBUpdateCallback(tx database.Tx) error
- func (chainProvider *ChainProvider) GbtWorkState() *mining.GBTWorkState
- func (chainProvider *ChainProvider) Log() zerolog.Logger
- func (chainProvider *ChainProvider) MiningAddresses() []jaxutil.Address
- func (chainProvider *ChainProvider) SetP2PProvider(p2pProvider netsync.PeerNotifier) (err error)
- func (chainProvider *ChainProvider) ShardCount() (uint32, error)
- func (chainProvider *ChainProvider) Stats() map[string]float64
- type ChainRuntimeConfig
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 chainctx.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 NewChainProvider ¶
func NewChainProvider(ctx context.Context, cfg ChainRuntimeConfig, chainCtx chainctx.IChainCtx, blockGen chaindata.ChainBlockGenerator, db database.DB, log zerolog.Logger) (*ChainProvider, error)
func (*ChainProvider) BTC ¶
func (chainProvider *ChainProvider) BTC() *btcd.BlockProvider
func (*ChainProvider) BestSnapshot ¶ added in v0.4.0
func (chainProvider *ChainProvider) BestSnapshot() *chaindata.BestState
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) (chaindata.BlockTemplate, error)
func (*ChainProvider) CalcKForHeight ¶ added in v0.4.0
func (chainProvider *ChainProvider) CalcKForHeight(height int32) uint32
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 `` /* 131-byte string literal not displayed */ AddCheckpoints []string `yaml:"add_checkpoints" toml:"add_checkpoints" description:"Add a custom checkpoint. Format: '<height>:<hash>'"` AddrIndex bool `` /* 149-byte string literal not displayed */ MaxPeers int `yaml:"max_peers" toml:"max_peers" description:"Max number of inbound and outbound peers"` BlockMaxSize uint32 `yaml:"block_max_size" toml:"block_max_size" description:"Maximum block size in bytes to be used when creating a block"` BlockMinSize uint32 `yaml:"block_min_size" toml:"block_min_size" description:"Mininum block size in bytes to be used when creating a block"` BlockMaxWeight uint32 `yaml:"block_max_weight" toml:"block_max_weight" description:"Maximum block weight to be used when creating a block"` BlockMinWeight uint32 `yaml:"block_min_weight" toml:"block_min_weight" description:"Mininum block weight to be used when creating a block"` BlockPrioritySize uint32 `` /* 142-byte string literal not displayed */ TxIndex bool `` /* 174-byte string literal not displayed */ NoRelayPriority bool `` /* 142-byte string literal not displayed */ RejectReplacement bool `` /* 201-byte string literal not displayed */ RelayNonStd bool `` /* 146-byte string literal not displayed */ FreeTxRelayLimit float64 `` /* 172-byte string literal not displayed */ MaxOrphanTxs int `yaml:"max_orphan_txs" toml:"max_orphan_txs" description:"Max number of orphan transactions to keep in memory"` MinRelayTxFee int64 `` /* 136-byte string literal not displayed */ NoCFilters bool `yaml:"no_c_filters" toml:"no_c_filters" description:"Disable committed filtering (CF) support"` DisableCheckpoints bool `` /* 147-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"` DBFullRescan bool `yaml:"db_full_rescan" toml:"db_full_rescan"` }
func (*ChainRuntimeConfig) ParseMiningAddresses ¶
Click to show internal directories.
Click to hide internal directories.