'This method is called when a download is removed. We check here whether we can stop building circuits for a
specific number of hops in case it hasn\'t been finished yet.'

def on_download_removed(self, download):

    if (download.get_hops() > 0):
        self.num_hops_by_downloads[download.get_hops()] -= 1
        if (self.num_hops_by_downloads[download.get_hops()] == 0):
            self.circuits_needed[download.get_hops()] = 0
