Skip to content
  • George Kadianakis's avatar
    Don't set HSDir index if we don't have a live consensus. · b89d2fa1
    George Kadianakis authored and Nick Mathewson's avatar Nick Mathewson committed
    We also had to alter the SRV functions to take a consensus as optional
    input, since we might be setting our HSDir index using a consensus that
    is currently being processed and won't be returned by the
    networkstatus_get_live_consensus() function.
    
    This change has two results:
    
    a) It makes sure we are using a fresh consensus with the right SRV value
       when we are calculating the HSDir hash ring.
    
    b) It ensures that we will not use the sr_get_current/previous()
       functions when we don't have a consensus which would have falsely
       triggered the disaster SRV logic.
    b89d2fa1