Maybe we can do away with issue 9971 and improve readability: https://trac.torproject.org/projects/tor/ticket/9971
As response to this mail, I'll append seperate patches for the 3 sub-issues mentioned. They apply (and are build-tested) seperately to the current tree, so a maintainer can quickly pick one of them up, if happy with it.
There shouldn't be a conflict in *1* and *2* but I could append a patchset anyway.
sub-issue *3* is *only* a call for advice and will be written on top of the other ones, after discussion.
1* rename entry_guard_t's made_contact to used_so_save_if_down I think that's readable. Is that about what arma had in mind?
2* rename for_discovery argument of add_an_entry_guard() to I like probationary more than provisional. Those 2 are suggested in issue 9971. I chose forced_probationary for now, because isn't it strictly a suboptimal situation in terms of desired 'grade of anonymity'. What do you think?
3* NEEDS REVIEW FIRST: regarding the int arguments of add_an_entry_guard(). I look at:
node_t *chosen is a node to add. prepend is set if the guard should become first in the list?
there are 2 users of add_an_entry_guard() that pass it a chosen node. One is a bridge (prepend) and the other one is a user-defined node (!prepend), so:
Given the fact that the list is not supposed to be long and the two 'users' are somewhat similar, why not prepend the node if explicitly given?