miningmanager

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: ISC Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory interface {
	NewMiningManager(consensus consensusreference.ConsensusReference, params *dagconfig.Params, mempoolConfig *mempoolpkg.Config) MiningManager
}

Factory instantiates new mining managers

func NewFactory

func NewFactory() Factory

NewFactory creates a new mining manager factory

type MiningManager

type MiningManager interface {
	GetBlockTemplate(coinbaseData *externalapi.DomainCoinbaseData) (block *externalapi.DomainBlock, isNearlySynced bool, err error)
	ClearBlockTemplate()
	GetBlockTemplateBuilder() miningmanagermodel.BlockTemplateBuilder
	GetTransaction(transactionID *externalapi.DomainTransactionID, includeTransactionPool bool, includeOrphanPool bool) (
		transactionPoolTransaction *externalapi.DomainTransaction,
		isOrphan bool,
		found bool)
	GetTransactionsByAddresses(includeTransactionPool bool, includeOrphanPool bool) (
		sendingInTransactionPool map[string]*externalapi.DomainTransaction,
		receivingInTransactionPool map[string]*externalapi.DomainTransaction,
		sendingInOrphanPool map[string]*externalapi.DomainTransaction,
		receivingInOrphanPool map[string]*externalapi.DomainTransaction,
		err error)
	AllTransactions(includeTransactionPool bool, includeOrphanPool bool) (
		transactionPoolTransactions []*externalapi.DomainTransaction,
		orphanPoolTransactions []*externalapi.DomainTransaction)
	TransactionCount(includeTransactionPool bool, includeOrphanPool bool) int
	HandleNewBlockTransactions(txs []*externalapi.DomainTransaction) ([]*externalapi.DomainTransaction, error)
	ValidateAndInsertTransaction(transaction *externalapi.DomainTransaction, isHighPriority bool, allowOrphan bool) (
		acceptedTransactions []*externalapi.DomainTransaction, err error)
	RevalidateHighPriorityTransactions() (validTransactions []*externalapi.DomainTransaction, err error)
}

MiningManager creates block templates for mining as well as maintaining known transactions that have no yet been added to any block

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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