don't hide uploaded blocks if we have no peers

This commit is contained in:
Kevin 2020-06-28 04:16:55 -05:00
parent 0d58d57467
commit 6738eaf222

View File

@ -57,6 +57,8 @@ def daemon_event_handlers(shared_state: 'TooMany'):
def upload_event(block: 'BlockHash' = ''): def upload_event(block: 'BlockHash' = ''):
if not block: if not block:
raise ValueError raise ValueError
if not comm_inst.onlinePeers:
return
public_api.hideBlocks.append(block) public_api.hideBlocks.append(block)
try: try:
mixmate.block_mixer(comm_inst.blocksToUpload, block) mixmate.block_mixer(comm_inst.blocksToUpload, block)