-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat: add mixed mining mode #8280
Conversation
There was a problem hiding this 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
crates/anvil/src/eth/miner.rs
Outdated
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); |
There was a problem hiding this comment.
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
a843d38
to
3523c8b
Compare
There was a problem hiding this 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
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