Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optional priority mempool #1827

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

optional priority mempool #1827

wants to merge 3 commits into from

Conversation

najeal
Copy link
Contributor

@najeal najeal commented Dec 4, 2024

This PR introduce a way to easily switch from a FIFO mempool to a Priority mempool.

Comment on lines +56 to +61
var mempoolFactory mempool.AbstractMempoolFactory[*chain.Transaction] = mempool.NewGeneralMempool[*chain.Transaction]

func WithPriorityMempool(factory mempool.AbstractMempoolFactory[*chain.Transaction]) {
mempoolFactory = factory
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mempool factory switch could be done in a more elegant way.

@najeal najeal marked this pull request as ready for review December 5, 2024 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant