* Revert back to hiding blocks even when we have no outgoing connections
* ensure that block is hidden in public list in insert test
This commit is contained in:
parent
1aa707cea5
commit
25485e6aa4
@ -57,8 +57,6 @@ 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)
|
||||||
|
@ -12,7 +12,10 @@ def _check_remote_node(testmanager):
|
|||||||
def insert_bin_test(testmanager):
|
def insert_bin_test(testmanager):
|
||||||
data = os.urandom(32)
|
data = os.urandom(32)
|
||||||
b_hash = onionrblocks.insert(data)
|
b_hash = onionrblocks.insert(data)
|
||||||
|
time.sleep(0.3)
|
||||||
|
if b_hash not in testmanager._too_many.get_by_string("PublicAPI").hideBlocks:
|
||||||
|
raise ValueError("Block not hidden")
|
||||||
|
|
||||||
if not b_hash in coredb.blockmetadb.get_block_list():
|
if b_hash not in coredb.blockmetadb.get_block_list():
|
||||||
logger.error(str(b_hash) + 'is not in bl')
|
logger.error(str(b_hash) + 'is not in bl')
|
||||||
raise ValueError
|
raise ValueError
|
||||||
|
Loading…
Reference in New Issue
Block a user