transaction pool optimizations#21328
Merged
Merged
Conversation
ucwong
reviewed
Jul 14, 2020
| txs := list.Flatten() // Heavy but will be cached and is needed by the miner anyway | ||
| pool.pendingNonces.set(addr, txs[len(txs)-1].Nonce()+1) | ||
| highestPending := list.LastElement() | ||
| pool.pendingNonces.set(addr, highestPending.Nonce()+1) |
Contributor
There was a problem hiding this comment.
Why not use one line
pool.pendingNonces.set(addr, list.LastElement().Nonce()+1)
Contributor
Author
There was a problem hiding this comment.
Yeah, that would be fine too. As it is, it's more obvious for a reader that we're getting the highest nonce:d transaction, so it's a bit simpler to understand what's happening. I don't see any compelling reason to change it now
9 tasks
enriquefynn
pushed a commit
to enriquefynn/go-ethereum
that referenced
this pull request
Mar 10, 2021
* core: added local tx pool test case * core, crypto: various allocation savings regarding tx handling * core/txlist, txpool: save a reheap operation, avoid some bigint allocs Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
20 tasks
gzliudan
pushed a commit
to gzliudan/XDPoSChain
that referenced
this pull request
May 13, 2024
* core: added local tx pool test case * core, crypto: various allocation savings regarding tx handling * core/txlist, txpool: save a reheap operation, avoid some bigint allocs Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
19 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains some of the commits from the (now reverted) #21232 , leaving out the erroneous conversions to
uint64