Compare commits

..

No commits in common. "7caaa829f20ce8476ece5faab28a543dd67628a9" and "0236fc83f41a8965084e3ee68a670f3a8c406ef7" have entirely different histories.

4 changed files with 2 additions and 11 deletions

View File

@ -30,14 +30,11 @@ async def do_stem_stream(
try: try:
# queues can't block because we're in async # queues can't block because we're in async
bl = block_queue.get(block=False) bl = block_queue.get(block=False)
assert hasattr(bl, 'raw')
except Empty: except Empty:
remaining_time = d_phase.remaining_time() remaining_time = d_phase.remaining_time()
await sleep(1) await sleep(1)
else: else:
break break
if not remaining_time:
break
logging.info("Sending block over dandelion++") logging.info("Sending block over dandelion++")
block_size = str(len(bl.raw)).zfill(BLOCK_SIZE_LEN) block_size = str(len(bl.raw)).zfill(BLOCK_SIZE_LEN)

View File

@ -102,8 +102,6 @@ async def diffuse_blocks(reader: 'StreamReader', writer: 'StreamWriter'):
break break
except ConnectionResetError: except ConnectionResetError:
pass pass
except IncompleteReadError:
pass
except Exception: except Exception:
logging.warn(traceback.format_exc()) logging.warn(traceback.format_exc())

View File

@ -62,7 +62,7 @@ def create_block(
def create_and_insert_block( def create_and_insert_block(
block_data: 'base64', block_data: 'base64',
block_type: str, ttl: int, metadata: dict) -> str: block_type: str, ttl: int, metadata: dict) -> str:
bl = _do_create_block(block_data, block_type, ttl, metadata) bl = _do_create_block(block_data, block_type, ttl, metadata)['id']
insert_block(bl) insert_block(bl)
return bl return bl

View File

@ -71,11 +71,7 @@ def on_get_our_transport(api, data=None):
def on_gossip_start(api, data: Set[Peer] = None): def on_gossip_start(api, data: Set[Peer] = None):
# We don't do gossip logic # We don't do gossip logic
try: starttor.start_tor()
starttor.start_tor()
except OSError:
logging.error("Tor is not in your path. Install a recent version of Tor and try again.")
return
with Controller.from_socket_file(control_socket) as controller: with Controller.from_socket_file(control_socket) as controller:
controller controller