2019-10-07 05:51:30 +00:00
|
|
|
import os
|
2019-10-19 08:47:24 +00:00
|
|
|
import time
|
2019-10-07 05:51:30 +00:00
|
|
|
|
|
|
|
import onionrblocks
|
|
|
|
import logger
|
|
|
|
import coredb
|
2019-10-19 08:47:24 +00:00
|
|
|
from communicator import peeraction
|
2019-10-07 05:51:30 +00:00
|
|
|
|
2019-10-11 09:28:43 +00:00
|
|
|
def _check_remote_node(testmanager):
|
2019-10-19 08:47:24 +00:00
|
|
|
return
|
2019-10-11 09:28:43 +00:00
|
|
|
|
2019-10-07 05:51:30 +00:00
|
|
|
def insert_bin_test(testmanager):
|
|
|
|
data = os.urandom(32)
|
2020-02-08 09:07:07 +00:00
|
|
|
b_hash = onionrblocks.insert(data)
|
2020-06-29 07:29:55 +00:00
|
|
|
time.sleep(0.3)
|
|
|
|
if b_hash not in testmanager._too_many.get_by_string("PublicAPI").hideBlocks:
|
|
|
|
raise ValueError("Block not hidden")
|
2019-10-11 09:28:43 +00:00
|
|
|
|
2020-06-29 07:29:55 +00:00
|
|
|
if b_hash not in coredb.blockmetadb.get_block_list():
|
2019-10-07 05:51:30 +00:00
|
|
|
logger.error(str(b_hash) + 'is not in bl')
|
2019-10-11 09:28:43 +00:00
|
|
|
raise ValueError
|