* prevent the same message from being inserted at the same time in the http api
* bumped toomanyobjs * correct pysocks raise fixes #34
This commit is contained in:
parent
795266edaf
commit
e86f154522
10 changed files with 36 additions and 10 deletions
|
@ -30,6 +30,8 @@ def handle_daemon_commands(comm_inst):
|
|||
events.event('daemon_command', data = {'cmd' : cmd})
|
||||
if cmd[0] == 'shutdown':
|
||||
comm_inst.shutdown = True
|
||||
elif cmd[0] == 'remove_from_insert_list':
|
||||
comm_inst.generating_blocks.remove(cmd[1])
|
||||
elif cmd[0] == 'announceNode':
|
||||
if len(comm_inst.onlinePeers) > 0:
|
||||
comm_inst.announce(cmd[1])
|
||||
|
|
|
@ -25,11 +25,13 @@ from . import shoulddownload
|
|||
from communicator import peeraction, onlinepeers
|
||||
import onionrcrypto, onionrstorage, onionrblacklist, storagecounter
|
||||
def download_blocks_from_communicator(comm_inst):
|
||||
'''Use Onionr communicator instance to download blocks in the communicator's queue'''
|
||||
assert isinstance(comm_inst, communicator.OnionrCommunicatorDaemon)
|
||||
blacklist = onionrblacklist.OnionrBlackList()
|
||||
storage_counter = storagecounter.StorageCounter()
|
||||
LOG_SKIP_COUNT = 10
|
||||
LOG_SKIP_COUNT = 10 # for how many iterations we skip logging the counter
|
||||
count = 0
|
||||
# Iterate the block queue in the communicator
|
||||
for blockHash in list(comm_inst.blockQueue):
|
||||
count += 1
|
||||
if len(comm_inst.onlinePeers) == 0:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue