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.
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
core/txpool/legacypool: add overflowpool for txs #2660
core/txpool/legacypool: add overflowpool for txs #2660
Changes from 42 commits
dfb046e
e30248b
f80ac01
8655d30
4538e92
4369e3d
d0d6a27
5faf413
5bb78b3
6b4e16b
d03f7e5
94a60a9
ed2d1d7
6daecfb
9d7298f
a1a25e9
253d9a5
0692a99
40dcfcd
6673f3e
ebd8f59
bdb4cc2
e45e7eb
069eaf2
70ece93
e7d0a16
16a2a53
0f8a1b5
76d157d
aeec0c7
53042e1
8e6833c
5f398db
706a24e
0e61543
0a5dbef
248bb6b
cf10c5c
b818cb7
774e314
629af6d
3e3c56b
0957562
846e55b
6a6e09c
355dee9
1ad40cd
d5b10e0
4e69ac4
31c9465
a8959fe
9c72c02
5d44ba9
7a929d6
8170d99
0e67514
f41bb13
0dd0bd7
60bdc25
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
why need this error? I think underpriced transaction can be simply discarded
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.
Suggestion-2:
maybe we can just use the
fastcache
instead? it is a RingBuffer, not LRU, RingBuffer has some advantages, you may refer: https://github.com/bnb-chain/bsc/blob/master/core/state/snapshot/disklayer.go#L36Fastcache may not work directly, as it does not support iteration. We can add a list of TxHash to support the iteration.
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.
I also suggest here to use well tested lib, like
github.com/ethereum/go-ethereum/common/lru
,github.com/VictoriaMetrics/fastcache
, etc. They have less bug and better performance.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.
maybe we should pre-allocate this to max size or some lvl e.g. 1/2 of capacity
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.
what if deleting one is not enough because of # of slots?
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.
this is the same as in if before, maybe it would be nicer to have it under one private function
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.
+1