-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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: greedy merge tx in bid #2363
Conversation
e80bc31
to
60e32b4
Compare
miner/worker.go
Outdated
@@ -1080,6 +1081,29 @@ func (w *worker) fillTransactions(interruptCh chan int32, env *environment, stop | |||
localBlobTxs[account] = 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.
how about move it to line#1068, so only need to filter: pendingPlainTxs & pendingBlobTxs, could be more efficient.
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.
ok,fixed
stopTimer := time.NewTimer(*delay) | ||
|
||
bidTxsSet := mapset.NewSet[common.Hash]() | ||
for _, tx := range bidRuntime.bid.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.
better to eliminate this for loop.
We can pass bidRuntime.bid.Txs
into fillTransactions(..., bidRuntime.bid.Txs)
directly.
// in fillTransactions(...)
for _, bigTx range bidRuntime.bid.Txs {
// check and remove from pendingPlainTxs & pendingBlobTxs
}
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.
hashset makes it simple
Description
Rationale
tell us why we need these changes...
Example
add an example CLI or API response...
Changes
Notable changes: