Versions in this module Expand all Collapse all v1 v1.6.14 Mar 23, 2021 v1.6.10 Mar 23, 2021 Changes in this version + const MinHighPriority + const UnminedHeight + func CalcPriority(tx *wire.MsgTx, prioInputs PriorityInputser, nextBlockHeight int64) float64 + func SortParentsByVotes(txSource TxSource, currentTopBlock chainhash.Hash, blocks []chainhash.Hash, ...) []chainhash.Hash + func UseLogger(logger slog.Logger) + type BgBlkTmplGenerator struct + func NewBgBlkTmplGenerator(tg *BlkTmplGenerator, addrs []vclutil.Address, allowUnsynced bool) *BgBlkTmplGenerator + func (g *BgBlkTmplGenerator) BlockAccepted(block *vclutil.Block) + func (g *BgBlkTmplGenerator) BlockConnected(block *vclutil.Block) + func (g *BgBlkTmplGenerator) BlockDisconnected(block *vclutil.Block) + func (g *BgBlkTmplGenerator) ChainReorgDone() + func (g *BgBlkTmplGenerator) ChainReorgStarted() + func (g *BgBlkTmplGenerator) CurrentTemplate() (*BlockTemplate, error) + func (g *BgBlkTmplGenerator) ForceRegen() + func (g *BgBlkTmplGenerator) Run(ctx context.Context) + func (g *BgBlkTmplGenerator) Subscribe() *TemplateSubscription + func (g *BgBlkTmplGenerator) UpdateBlockTime(header *wire.BlockHeader) error + func (g *BgBlkTmplGenerator) VoteReceived(tx *vclutil.Tx) + type BlkTmplGenerator struct + func NewBlkTmplGenerator(policy *Policy, txSource TxSource, timeSource blockchain.MedianTimeSource, ...) *BlkTmplGenerator + func (g *BlkTmplGenerator) NewBlockTemplate(payToAddress vclutil.Address) (*BlockTemplate, error) + func (g *BlkTmplGenerator) UpdateBlockTime(header *wire.BlockHeader) error + type BlockTemplate struct + Block *wire.MsgBlock + Fees []int64 + Height int64 + SigOpCounts []int64 + ValidPayAddress bool + type MiningErrorCode int + const ErrCalcCommitmentRoot + const ErrCheckConnectBlock + const ErrFailedToGetGeneration + const ErrFetchTxStore + const ErrFraudProofIndex + const ErrGetTopBlock + const ErrGettingDifficulty + const ErrNotEnoughVoters + const ErrTicketExhaustion + const ErrTransactionAppend + func (e MiningErrorCode) String() string + type MiningRuleError struct + Description string + ErrorCode MiningErrorCode + func (e MiningRuleError) Error() string + func (e MiningRuleError) GetCode() MiningErrorCode + type Policy struct + AggressiveMining bool + BlockMaxSize uint32 + BlockMinSize uint32 + BlockPrioritySize uint32 + StandardVerifyFlags func() (txscript.ScriptFlags, error) + TxMinFreeFee vclutil.Amount + type PriorityInputser interface + PriorityInput func(prevOut *wire.OutPoint) (blockHeight int64, amount int64, ok bool) + type TemplateNtfn struct + Reason TemplateUpdateReason + Template *BlockTemplate + type TemplateSubscription struct + func (s *TemplateSubscription) C() <-chan *TemplateNtfn + func (s *TemplateSubscription) Stop() + type TemplateUpdateReason int + const TURNewParent + const TURNewTxns + const TURNewVotes + type TxAncestorStats struct + Fees int64 + NumAncestors int + NumDescendants int + SizeBytes int64 + TotalSigOps int + type TxDesc struct + Added time.Time + Fee int64 + Height int64 + TotalSigOps int + Tx *vclutil.Tx + TxSize int64 + Type stake.TxType + type TxMiningView interface + AncestorStats func(txHash *chainhash.Hash) (*TxAncestorStats, bool) + Ancestors func(txHash *chainhash.Hash) []*TxDesc + Children func(txHash *chainhash.Hash) []*TxDesc + HasParents func(txHash *chainhash.Hash) bool + IsRejected func(txHash *chainhash.Hash) bool + Parents func(txHash *chainhash.Hash) []*TxDesc + Reject func(txHash *chainhash.Hash) + Remove func(txHash *chainhash.Hash, updateDescendantStats bool) + TxDescs func() []*TxDesc + type TxSource interface + HaveAllTransactions func(hashes []chainhash.Hash) bool + HaveTransaction func(hash *chainhash.Hash) bool + IsRegTxTreeKnownDisapproved func(hash *chainhash.Hash) bool + LastUpdated func() time.Time + MiningView func() TxMiningView + VoteHashesForBlock func(hash *chainhash.Hash) []chainhash.Hash + VotesForBlocks func(hashes []chainhash.Hash) [][]VoteDesc + type VoteDesc struct + ApprovesParent bool + TicketHash chainhash.Hash + VoteHash chainhash.Hash