-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(net): fix failure to process FETCH_INV_DATA message #5460
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
Conversation
| } | ||
| long now = System.currentTimeMillis(); | ||
| invToFetch.forEach((item, time) -> { | ||
| if (time < now - MSG_CACHE_DURATION_IN_BLOCKS * BLOCK_PRODUCED_INTERVAL) { |
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.
Shouldn't MSG_CACHE_DURATION_IN_BLOCKS * BLOCK_PRODUCED_INTERVAL be replaced with TIMEOUT here?
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
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5460 +/- ##
==========================================
Coverage 61.45% 61.45%
+ Complexity 9370 9369 -1
==========================================
Files 846 846
Lines 50298 50300 +2
Branches 5585 5585
==========================================
+ Hits 30911 30913 +2
+ Misses 16969 16968 -1
- Partials 2418 2419 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| invToFetch.remove(item); | ||
| }); | ||
| peers.stream().filter(peer -> { | ||
| Long t = peer.getAdvInvReceive().getIfPresent(item); |
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 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.
Not the same, times from different caches
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.
math.abs(t-time) is very close to 0. Am I getting this right?
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.
you're right.
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.
math.abs(t-time) is very close to 0
if time >= now - TIMEOUT, now - t < TIMEOUT when is it false?
| long now = System.currentTimeMillis(); | ||
| invToFetch.forEach((item, time) -> { | ||
| if (time < now - MSG_CACHE_DURATION_IN_BLOCKS * BLOCK_PRODUCED_INTERVAL) { | ||
| if (time < now - TIMEOUT) { |
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.
Is there an assumption: no more than 2w transactions will be broadcast within 15s?
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.
At present, it is basically impossible to reach 20,000 within 15 seconds. We only focus on time and not TPS.


What does this PR do?
Fix failure to process FETCH_INV_DATA message, fix #5439.
Why are these changes required?
This PR has been tested by:
Follow up
Extra details