model

package
v2.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: ISC Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockTemplateBuilder

type BlockTemplateBuilder interface {
	BuildBlockTemplate(coinbaseData *consensusexternalapi.DomainCoinbaseData) (*consensusexternalapi.DomainBlockTemplate, error)
	ModifyBlockTemplate(newCoinbaseData *consensusexternalapi.DomainCoinbaseData,
		blockTemplateToModify *consensusexternalapi.DomainBlockTemplate) (*consensusexternalapi.DomainBlockTemplate, error)
}

BlockTemplateBuilder builds block templates for miners to consume

type Mempool

type Mempool interface {
	HandleNewBlockTransactions(txs []*externalapi.DomainTransaction) ([]*externalapi.DomainTransaction, error)
	BlockCandidateTransactions() []*externalapi.DomainTransaction
	ValidateAndInsertTransaction(transaction *externalapi.DomainTransaction, isHighPriority bool, allowOrphan bool) (
		acceptedTransactions []*externalapi.DomainTransaction, err error)
	RemoveTransactions(txs []*externalapi.DomainTransaction, removeRedeemers bool) error
	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
	RevalidateHighPriorityTransactions() (validTransactions []*externalapi.DomainTransaction, err error)
	IsTransactionOutputDust(output *externalapi.DomainTransactionOutput) bool
}

Mempool maintains a set of known transactions that are intended to be mined into new blocks

Jump to

Keyboard shortcuts

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