plaintext block fixes with sharing, fixed peer lookup
This commit is contained in:
parent
835c2e527e
commit
3ef29077e7
9 changed files with 23 additions and 12 deletions
|
@ -111,6 +111,9 @@ def download_blocks_from_communicator(comm_inst: "OnionrCommunicatorDaemon"):
|
|||
try:
|
||||
metadata_validation_result = \
|
||||
validatemetadata.validate_metadata(metadata, metas[2])
|
||||
except onionrexceptions.PlaintextNotSupported:
|
||||
logger.debug(f"Not saving {blockHash} due to plaintext not enabled")
|
||||
removeFromQueue = True
|
||||
except onionrexceptions.DataExists:
|
||||
metadata_validation_result = False
|
||||
if metadata_validation_result: # check if metadata is valid, and verify nonce
|
||||
|
|
|
@ -64,3 +64,4 @@ def lookup_new_peer_transports_with_communicator(shared_state):
|
|||
except ValueError:
|
||||
pass
|
||||
kv.get('newPeers').extend(newPeers)
|
||||
shared_state.get_by_string("OnionrCommunicatorDaemon").decrementThreadCount('clean_old_blocks')
|
||||
|
|
|
@ -38,7 +38,7 @@ def block_mixer(upload_list: List[onionrtypes.BlockHash],
|
|||
to the said block list
|
||||
"""
|
||||
bl = onionrblockapi.Block(block_to_mix)
|
||||
|
||||
print(bl.raw)
|
||||
if time.time() - bl.claimedTime > onionrvalues.BLOCK_POOL_MAX_AGE:
|
||||
raise ValueError
|
||||
if block_to_mix:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue