#NEWLINE# def _announce_hashes( self , hashes ) : #NEWLINE# #INDENT# ds = [ ] #NEWLINE# for h in hashes : #NEWLINE# #INDENT# announce_deferred = defer . Deferred ( ) #NEWLINE# ds . append ( announce_deferred ) #NEWLINE# self . hash_queue . append ( ( h , announce_deferred ) ) #NEWLINE# #UNINDENT# def announce( ) : #NEWLINE# #INDENT# if len ( self . hash_queue ) : #NEWLINE# #INDENT# ( h , announce_deferred ) = self . hash_queue . popleft ( ) #NEWLINE# d = self . dht_node . announceHaveBlob ( binascii . unhexlify ( h ) , self . peer_port ) #NEWLINE# d . chainDeferred ( announce_deferred ) #NEWLINE# d . addBoth ( ( lambda _ : reactor . callLater ( 0 , announce ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _concurrent_announcers -= 1 #NEWLINE# #UNINDENT# #UNINDENT# for i in range ( self . _concurrent_announcers , 5 ) : #NEWLINE# #INDENT# self . _concurrent_announcers += 1 #NEWLINE# announce ( ) #NEWLINE# #UNINDENT# return defer . DeferredList ( announce_deferred )