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
Router split #372
Router split #372
Conversation
This is also used by onion services, so it needs to go in another module.
This is preparation for having a routermode.h as well
Note that I haven't separated the headers yet (there's still an
(It turns out that some of the functions in router.h didn't even exist any more, so I just got to delete their declarations completely.)
Since this is completely core functionality, I'm putting it in core/mainloop, even though it depends on feature/hibernate. We'll have to sort that out in the future.
Make them only include the headers that they needed, and sort their headers while we're at it.
#include "app/config/config.h" | ||
#include "feature/hibernate/hibernate.h" | ||
|
||
/** Return true iff our network is in some sense disabled or shutting down: |
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.
if
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.
"iff" is intentional: It's an abbreviation for "if and only if". See https://en.wikipedia.org/wiki/If_and_only_if
return get_options()->DisableNetwork || we_are_hibernating(); | ||
} | ||
|
||
/** Return true iff our network is in some sense "completely disabled" either |
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.
if
#include "core/or/or.h" | ||
#include "core/mainloop/netstatus.h" | ||
#include "app/config/config.h" | ||
#include "feature/hibernate/hibernate.h" |
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 think we should either make a ticket or a big XXX: in the code at least so we kind of remember that relationship and that we should fix that.
Great part with a ticket, anyone could pick it up :D
No description provided.