| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
This machinery is a bit inelegant, but it is all confined to
be within the GuardMgr crate, so IMO it should be fine for now.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
We already _have_ these Arc<>s whenever we construct a UniverseRef,
so there's no real point in using &refs and making these so
hard to construct.
|
| |
|
|
|
|
| |
This can probably be done in a simpler way, but for the moment I
would prefer to try to minimize the amount of code I'm changing
here.
|
| |
|
|
| |
This removes some duplication.
|
| | |
|
| |
|
|
|
|
|
| |
Previously we always set `dir_info_missing` to `false` for new
guards, since new guards could only be taken from ones that were
present in the NetDir. But for bridges, we don't download their
info until _after_ we have chosen them as guards.
|
| |
|
|
| |
This will be necessary for bridges.
|
| |
|
|
| |
This is a trickier case, since we have to deal with weights.
|
|
|
In this and the upcoming commits I'll be changing how guards related
to `NetDir` and to `Relay`. Previously, a guard could only come
from (or be updated from) a `Relay` in a `NetDir`. Soon it will be
able to be built from a bridge as well.
To do this, I'm defining a `Universe` trait (name negotiable) that
represents a set of things that may be guards. I'm going to
continue extending its functionality until there are no more
methods in guard.rs or sample.rs that take `NetDir`.
This commit removes most of the usage of `NetDir` and `Relay` in
`guard.rs`.
|