Documentation ¶
Index ¶
- Constants
- Variables
- func BasicScriptSig() *script.Script
- func CoinbaseScriptSig(extraNonce uint) *script.Script
- func GetBlockSize() uint64
- func GetLastBlockSize() uint64
- func GetLastBlockTx() uint64
- func SetBlockSize(size uint64)
- func TestBlockValidity(block *block.Block, indexPrev *blockindex.BlockIndex, checkHeader bool, ...) (err error)
- func UpdateTime(bk *block.Block, indexPrev *blockindex.BlockIndex) int64
- type BlockAssembler
- type BlockTemplate
- type ByAncsCount
- type EntryAncestorFeeRateSort
- type EntryFeeSort
Constants ¶
View Source
const ( /*MaxTxSigOpsCount allowed number of signature check operations per transaction. */ MaxTxSigOpsCount uint64 = 20000 /*DefaultMaxGeneratedBlockSize default for -blockMaxsize, which controls the maximum size of block the * mining code will create **/ DefaultMaxGeneratedBlockSize uint64 = 2 * util.OneMegaByte //DefaultMaxBlockSize = 32 * OneMegaByte DefaultMaxBlockSize = wire.MaxBlockPayload /*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 = "copernicus"
)
Variables ¶
View Source
var (
MaxTxFee = DefaultTransactionMaxfee
)
global value in mining module
Functions ¶
func BasicScriptSig ¶ added in v0.0.3
func CoinbaseScriptSig ¶ added in v0.0.3
func GetBlockSize ¶
func GetBlockSize() uint64
func GetLastBlockSize ¶
func GetLastBlockSize() uint64
func GetLastBlockTx ¶
func GetLastBlockTx() uint64
func SetBlockSize ¶
func SetBlockSize(size uint64)
func TestBlockValidity ¶
func TestBlockValidity(block *block.Block, indexPrev *blockindex.BlockIndex, checkHeader bool, checkMerlke bool) (err error)
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 *model.BitcoinParams) *BlockAssembler
func (*BlockAssembler) CreateNewBlock ¶
func (ba *BlockAssembler) CreateNewBlock(scriptPubKey, scriptSig *script.Script) *BlockTemplate
type BlockTemplate ¶
type ByAncsCount ¶ added in v0.0.3
func (ByAncsCount) Len ¶ added in v0.0.3
func (a ByAncsCount) Len() int
func (ByAncsCount) Less ¶ added in v0.0.3
func (a ByAncsCount) Less(i, j int) bool
func (ByAncsCount) Swap ¶ added in v0.0.3
func (a ByAncsCount) Swap(i, j int)
type EntryAncestorFeeRateSort ¶
EntryAncestorFeeRateSort TxEntry sorted by feeRateWithAncestors
func (EntryAncestorFeeRateSort) Less ¶
func (r EntryAncestorFeeRateSort) Less(than mapcontainer.Lesser) bool
type EntryFeeSort ¶
EntryFeeSort TxEntry sorted by feeWithAncestors
func (EntryFeeSort) Less ¶
func (e EntryFeeSort) Less(than mapcontainer.Lesser) bool
Click to show internal directories.
Click to hide internal directories.