-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[Trivial] Remove dead code #3753
Changes from 1 commit
5de5164
02a615e
1effa04
3a69aac
53b81a1
8587358
0edb207
fe39326
499d1f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,9 +99,7 @@ OverlayImpl::Timer::on_timer(error_code ec) | |
overlay_.m_peerFinder->once_per_second(); | ||
overlay_.sendEndpoints(); | ||
overlay_.autoConnect(); | ||
|
||
if ((overlay_.timer_count_ % Tuning::checkIdlePeers) == 0) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this deleted? This was added so that we don't check for idle peers too frequently. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. oh, right! it's a bug then! it should be incremented. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i see what happened. it used to be this:
but then two top lines were deleted in one of the unrelated commits. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't seem like the right PR to fix that bug, but I wouldn't remove the code either. Let's just keep the code for now and open an issue so we don't lose track of this. @gregtatcam can you open an issue? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I opened the issue #3754. |
||
overlay_.deleteIdlePeers(); | ||
overlay_.deleteIdlePeers(); | ||
|
||
timer_.expires_from_now(std::chrono::seconds(1)); | ||
timer_.async_wait(overlay_.strand_.wrap(std::bind( | ||
|
@@ -138,7 +136,6 @@ OverlayImpl::OverlayImpl( | |
collector)) | ||
, m_resolver(resolver) | ||
, next_id_(1) | ||
, timer_count_(0) | ||
, slots_(app, *this) | ||
, m_stats( | ||
std::bind(&OverlayImpl::collect_metrics, this), | ||
|
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.
Let's check with @miguelportilla before removing this and the
verify
implementation.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 am okay removing this commented out code. Although the backend verify function isn't used, it could be useful at some point. For instance, the above situation can be addressed by calling verify on the new deterministic backend. I could also see a server startup switch to have the backend be verified at startup.