Interface TransactionSelectionService
- All Superinterfaces:
BesuService
Transaction selection service interface
-
Method Summary
Modifier and TypeMethodDescriptioncreatePluginTransactionSelector(ProcessableBlockHeader pendingBlockHeader, SelectorsStateManager selectorsStateManager) Create a transaction selector pluginvoidregisterPluginTransactionSelectorFactory(PluginTransactionSelectorFactory transactionSelectorFactory) Registers the transaction selector factory with the servicevoidselectPendingTransactions(BlockTransactionSelectionService blockTransactionSelectionService, ProcessableBlockHeader pendingBlockHeader, List<? extends org.hyperledger.besu.datatypes.PendingTransaction> candidatePendingTransactions) Called during the block creation to allow plugins to propose their own pending transactions for block inclusion
-
Method Details
-
createPluginTransactionSelector
PluginTransactionSelector createPluginTransactionSelector(ProcessableBlockHeader pendingBlockHeader, SelectorsStateManager selectorsStateManager) Create a transaction selector plugin- Parameters:
pendingBlockHeader- the header of the block being createdselectorsStateManager- the selectors state manager- Returns:
- the transaction selector plugin
-
selectPendingTransactions
void selectPendingTransactions(BlockTransactionSelectionService blockTransactionSelectionService, ProcessableBlockHeader pendingBlockHeader, List<? extends org.hyperledger.besu.datatypes.PendingTransaction> candidatePendingTransactions) Called during the block creation to allow plugins to propose their own pending transactions for block inclusion- Parameters:
blockTransactionSelectionService- the service used by the plugin to evaluate pending transactions and commit or rollback changespendingBlockHeader- the header of the block being createdcandidatePendingTransactions- the unmodifiable list of candidate pending transactions from the public pool, in the order they will be evaluated
-
registerPluginTransactionSelectorFactory
void registerPluginTransactionSelectorFactory(PluginTransactionSelectorFactory transactionSelectorFactory) Registers the transaction selector factory with the service- Parameters:
transactionSelectorFactory- transaction selector factory to be used
-