Compare commits
No commits in common. "7caaa829f20ce8476ece5faab28a543dd67628a9" and "0236fc83f41a8965084e3ee68a670f3a8c406ef7" have entirely different histories.
7caaa829f2
...
0236fc83f4
@ -30,14 +30,11 @@ async def do_stem_stream(
|
||||
try:
|
||||
# queues can't block because we're in async
|
||||
bl = block_queue.get(block=False)
|
||||
assert hasattr(bl, 'raw')
|
||||
except Empty:
|
||||
remaining_time = d_phase.remaining_time()
|
||||
await sleep(1)
|
||||
else:
|
||||
break
|
||||
if not remaining_time:
|
||||
break
|
||||
logging.info("Sending block over dandelion++")
|
||||
|
||||
block_size = str(len(bl.raw)).zfill(BLOCK_SIZE_LEN)
|
||||
|
@ -102,8 +102,6 @@ async def diffuse_blocks(reader: 'StreamReader', writer: 'StreamWriter'):
|
||||
break
|
||||
except ConnectionResetError:
|
||||
pass
|
||||
except IncompleteReadError:
|
||||
pass
|
||||
except Exception:
|
||||
logging.warn(traceback.format_exc())
|
||||
|
||||
|
@ -62,7 +62,7 @@ def create_block(
|
||||
def create_and_insert_block(
|
||||
block_data: 'base64',
|
||||
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)
|
||||
return bl
|
||||
|
||||
|
@ -71,11 +71,7 @@ def on_get_our_transport(api, data=None):
|
||||
def on_gossip_start(api, data: Set[Peer] = None):
|
||||
# We don't do gossip logic
|
||||
|
||||
try:
|
||||
starttor.start_tor()
|
||||
except OSError:
|
||||
logging.error("Tor is not in your path. Install a recent version of Tor and try again.")
|
||||
return
|
||||
starttor.start_tor()
|
||||
|
||||
with Controller.from_socket_file(control_socket) as controller:
|
||||
controller
|
||||
|
Loading…
Reference in New Issue
Block a user