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

feat: add mixed mining mode #8280

Merged
merged 7 commits into from
Jul 23, 2024

Conversation

caiquejjx
Copy link
Contributor

@caiquejjx caiquejjx commented Jun 27, 2024

Motivation

Solves #7901

Solution

Add a new mining mode called mixed which allows for both auto and interval to be set and will poll both cases

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

cool, sorry for the delay

this is pretty good already, only have one suggestion

match (auto_txs, fixed_txs) {
// Both auto and fixed transactions are ready, combine them
(Poll::Ready(mut auto_txs), Poll::Ready(mut fixed_txs)) => {
auto_txs.append(&mut fixed_txs);
Copy link
Member

@mattsse mattsse Jul 16, 2024

Choose a reason for hiding this comment

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

there might be the case here where both include the the same txs so we need to make the set unique, basically only append if the not included in auto_txs
we can simply filter by hash

@mattsse mattsse marked this pull request as ready for review July 16, 2024 18:04
@caiquejjx caiquejjx requested a review from mattsse July 23, 2024 14:09
@mattsse mattsse force-pushed the feat/add-mixed-mining-mode branch from a843d38 to 3523c8b Compare July 23, 2024 14:42
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

nice, I only did one smol touchup and filtered by txhash instead of using a tree

@mattsse mattsse enabled auto-merge (squash) July 23, 2024 14:43
@mattsse mattsse disabled auto-merge July 23, 2024 16:10
@mattsse mattsse merged commit 5af9d16 into foundry-rs:master Jul 23, 2024
17 of 20 checks passed
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.

None yet

2 participants