Skip to content

optional priority mempool#1827

Open
najeal wants to merge 3 commits intoava-labs:mainfrom
najeal:mempool-type
Open

optional priority mempool#1827
najeal wants to merge 3 commits intoava-labs:mainfrom
najeal:mempool-type

Conversation

@najeal
Copy link
Copy Markdown
Contributor

@najeal najeal commented Dec 4, 2024

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

Comment thread vm/vm.go
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
Copy Markdown
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