Skip to content
  • David Goulet's avatar
    relay: Launch dummy circuit only when descriptor build fails · bc5f26ff
    David Goulet authored and Nick Mathewson's avatar Nick Mathewson committed
    First, this commit moves the launch_dummy_circuit_as_needed() function into
    relay_find_addr.c and renames it to relay_addr_learn_from_dirauth(). This is
    an attempt to centralize anything relate with address discovery in the right
    module.
    
    Second, when building a descriptor and we fail to discover our address,
    immediately launch a dummy circuit to an authority in an attempt to learn our
    descriptor.
    
    It is still only done every 20 minutes even though the descriptor build is
    done every minute. We ought to avoid load on the authority and if we can't
    learn in the first place our address from them, chances are more things are
    wrong.
    
    Related to #40071
    
    
    
    Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
    bc5f26ff