Documentation
¶
Index ¶
- Constants
- Variables
- func GetBlockSize() uint64
- func GetBlockSubsidy(height int32, params *chainparams.BitcoinParams) amount.Amount
- func GetLastBlockSize() uint64
- func GetLastBlockTx() uint64
- func IncrementExtraNonce(bk *block.Block, bindex *blockindex.BlockIndex) (extraNonce uint)
- func SetBlockSize(size uint64)
- func UpdateTime(bk *block.Block, indexPrev *blockindex.BlockIndex) int64
- type BlockAssembler
- type BlockTemplate
- type EntryAncestorFeeRateSort
- type EntryFeeSort
Constants ¶
View Source
const ( /*MaxTxSigOpsCount allowed number of signature check operations per transaction. */ MaxTxSigOpsCount uint64 = 20000 /*OneMegaByte 1MB */ OneMegaByte uint64 = 1000000 /*DefaultMaxGeneratedBlockSize default for -blockMaxsize, which controls the maximum size of block the * mining code will create **/ DefaultMaxGeneratedBlockSize uint64 = 2 * OneMegaByte DefaultMaxBlockSize = 8 * OneMegaByte /*DefaultBlockPrioritySize default for -blockPrioritySize, maximum space for zero/low-fee transactions*/ DefaultBlockPrioritySize uint64 = 0 /*DefaultBlockMinTxFee default for -blockMinTxFee, which sets the minimum feeRate for a transaction * in blocks created by mining code **/ DefaultBlockMinTxFee uint = 1000 /*MaxStandardTxSize the maximum size for transactions we're willing to relay/mine */ MaxStandardTxSize uint = 100000 /*MaxP2SHSigOps maximum number of signature check operations in an IsStandard() P2SH script*/ MaxP2SHSigOps uint = 15 /*MaxStandardTxSigOps the maximum number of sigops we're willing to relay/mine in a single tx */ MaxStandardTxSigOps = uint(MaxTxSigOpsCount / 5) DefaultTransactionMaxfee = util.COIN / 10 )
View Source
const (
CoinbaseFlag = ""
)
todo define Coinbase Flag for miner or pool
Variables ¶
View Source
var (
MaxTxFee = DefaultTransactionMaxfee
)
global value in mining module
Functions ¶
func GetBlockSize ¶
func GetBlockSize() uint64
func GetBlockSubsidy ¶
func GetBlockSubsidy(height int32, params *chainparams.BitcoinParams) amount.Amount
func GetLastBlockSize ¶
func GetLastBlockSize() uint64
func GetLastBlockTx ¶
func GetLastBlockTx() uint64
func IncrementExtraNonce ¶
func IncrementExtraNonce(bk *block.Block, bindex *blockindex.BlockIndex) (extraNonce uint)
func SetBlockSize ¶
func SetBlockSize(size uint64)
func UpdateTime ¶
func UpdateTime(bk *block.Block, indexPrev *blockindex.BlockIndex) int64
Types ¶
type BlockAssembler ¶
type BlockAssembler struct {
// contains filtered or unexported fields
}
BlockAssembler Generate a new block, without valid proof-of-work
func NewBlockAssembler ¶
func NewBlockAssembler(params *chainparams.BitcoinParams) *BlockAssembler
func (*BlockAssembler) CreateNewBlock ¶
func (ba *BlockAssembler) CreateNewBlock(coinbaseScript *script.Script) *BlockTemplate
type BlockTemplate ¶
type EntryAncestorFeeRateSort ¶
EntryAncestorFeeRateSort TxEntry sorted by feeRateWithAncestors
type EntryFeeSort ¶
EntryFeeSort TxEntry sorted by feeWithAncestors
Click to show internal directories.
Click to hide internal directories.