selector

package
v0.0.0-...-be778be Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package selector provides different transaction selecting algorithms.

Index

Constants

View Source
const (
	StrategyTip         = "tip"
	StrategyTipAdvanced = "tip_advanced"
)

List of different select strategies.

Variables

This section is empty.

Functions

This section is empty.

Types

type Func

type Func func(transactions map[database.AccountID][]database.BlockTx, howMany int) []database.BlockTx

Func defines a function that takes a mempool of transactions grouped by account and selects howMany of them in an order based on the functions strategy. All selector functions MUST respect nonce ordering. Receiving 0 for howMany must return all the transactions in the strategies ordering.

func Retrieve

func Retrieve(strategy string) (Func, error)

Retrieve returns the specified select strategy function.

Jump to

Keyboard shortcuts

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