Simplify building circuits
This could be another reason #29710 (closed)
Looking which are the reasons why relays fail to be measured, found the following ones:
From scanner.py:323 - measure_relay
- Can not build a circuit, no path.
- Reached our 10.0 second timeout
- Circuit failed to be created: DESTROYED
- Circuit failed to be created: CHANNEL_CLOSED
circuitbuilder.py:110 - _normalize_path
- Tor seems to no longer think XXX is a relay
The first and last cases happen when the code to build the path retrives again the relay from the consensus.
The code (https://gitlab.torproject.org/tpo/network-health/sbws/-/blob/maint-1.1/sbws/lib/circuitbuilder.py#L140) seems to have been used for other different paths, but most of it is not needed, since the path will fail anyway in case the relay is not running.
That code maybe add extra seconds to build the circuit, in which the relays become unavailable?
Even if that would not be a reason, that code could still be simplified