model

package
v0.0.0-...-decf009 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: ISC Imports: 2 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)
	RemoveInvalidTransactions(err *ruleerrors.ErrInvalidTransactionsInNewBlock) 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