-
Notifications
You must be signed in to change notification settings - Fork 236
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
chore: Move txpool statistics from callbacks to PoolMap #4276
chore: Move txpool statistics from callbacks to PoolMap #4276
Conversation
return true; | ||
} | ||
false | ||
!entries.is_empty() |
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 believe this change introduces a logical inconsistency compared to the previous commit. In the previous commit, when self.pool_map.remove_entry(id)
was Some
, it would return true
, but now it returns false
.
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.
self.pool_map.remove_entry(id)
will never return Some(_)
, because the above self.pool_map.remove_entry_and_descendants(id)
already removed the entry with id
.
433e6c1
to
7e06792
Compare
7e06792
to
1a88a04
Compare
Co-authored-by: Quake Wang <quake.wang@gmail.com>
f859bfe
to
b1a1e2a
Compare
What problem does this PR solve?
Problem Summary:
The
total_tx_size
andtotal_tx_cycle
are zero when we useplug_entry
to add entries intotx_pool
, which caused some confusing when debugging.Updating statics was implemented in callbacks because we had 3 separate queue in
txpool
, now we have refactor it to the only onePoolMap
, it's better and cleaner to move this part toPoolMap
.What is changed and how it works?
What's Changed:
Cleanup
callbacks
to movetxpool
statics part toPoolMap
.Related changes
owner/repo
:Check List
Tests
Release note