cprovider

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: ISC Imports: 14 Imported by: 0

Documentation

Overview

Copyright (c) 2020 The JaxNetwork developers Use of this source code is governed by an ISC license that can be found in the LICENSE file.

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  []btcutil.Address

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

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) (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() []btcutil.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 added in v0.1.6

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

type ChainRuntimeConfig

type ChainRuntimeConfig struct {
	SigCacheMaxSize     uint           `` /* 128-byte string literal not displayed */
	AddCheckpoints      []string       `yaml:"add_checkpoints" long:"addcheckpoint" description:"Add a custom checkpoint.  Format: '<height>:<hash>'"`
	AddrIndex           bool           `` /* 148-byte string literal not displayed */
	MaxPeers            int            `yaml:"max_peers" long:"maxpeers" description:"Max number of inbound and outbound peers"`
	BlockMaxSize        uint32         `yaml:"block_max_size" long:"blockmaxsize" description:"Maximum block size in bytes to be used when creating a block"`
	BlockMinSize        uint32         `yaml:"block_min_size" long:"blockminsize" description:"Mininum block size in bytes to be used when creating a block"`
	BlockMaxWeight      uint32         `yaml:"block_max_weight" long:"blockmaxweight" description:"Maximum block weight to be used when creating a block"`
	BlockMinWeight      uint32         `yaml:"block_min_weight" long:"blockminweight" description:"Mininum block weight to be used when creating a block"`
	BlockPrioritySize   uint32         `` /* 140-byte string literal not displayed */
	TxIndex             bool           `` /* 158-byte string literal not displayed */
	NoRelayPriority     bool           `` /* 140-byte string literal not displayed */
	RejectReplacement   bool           `` /* 200-byte string literal not displayed */
	RelayNonStd         bool           `` /* 144-byte string literal not displayed */
	FreeTxRelayLimit    float64        `` /* 167-byte string literal not displayed */
	MaxOrphanTxs        int            `yaml:"max_orphan_txs" long:"maxorphantx" description:"Max number of orphan transactions to keep in memory"`
	MinRelayTxFee       float64        `` /* 129-byte string literal not displayed */
	MinRelayTxFeeValues btcutil.Amount `yaml:"-"`
	NoCFilters          bool           `yaml:"no_c_filters" long:"nocfilters" description:"Disable committed filtering (CF) support"`
	DisableCheckpoints  bool           `` /* 141-byte string literal not displayed */
	MiningAddresses     []string       `yaml:"mining_addresses"`
	AutoExpand          bool           `yaml:"auto_expand"`
	ExpansionRule       int32          `yaml:"expansion_rule"`
	ExpansionLimit      int32          `yaml:"expansion_limit"`
}

func (*ChainRuntimeConfig) ParseMiningAddresses

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

Jump to

Keyboard shortcuts

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