fixed dumb print leftover spamming hashes
This commit is contained in:
parent
c674e2d281
commit
71aadb7767
@ -114,6 +114,7 @@ class PublicAPI:
|
||||
# Provide a list of our blocks, with a date offset
|
||||
dateAdjust = request.args.get('date')
|
||||
bList = clientAPI._core.getBlockList(dateRec=dateAdjust)
|
||||
if config.get('general.hide_created_blocks', True):
|
||||
for b in self.hideBlocks:
|
||||
if b in bList:
|
||||
# Don't share blocks we created if they haven't been *uploaded* yet, makes it harder to find who created a block
|
||||
@ -126,7 +127,7 @@ class PublicAPI:
|
||||
resp = ''
|
||||
data = name
|
||||
if clientAPI._utils.validateHash(data):
|
||||
if data not in self.hideBlocks:
|
||||
if not config.get('general.hide_created_blocks', True) or data not in self.hideBlocks:
|
||||
if data in clientAPI._core.getBlockList():
|
||||
block = clientAPI.getBlockData(data, raw=True)
|
||||
try:
|
||||
@ -244,7 +245,7 @@ class API:
|
||||
'''
|
||||
Initialize the api server, preping variables for later use
|
||||
|
||||
This initilization defines all of the API entry points and handlers for the endpoints and errors
|
||||
This initialization defines all of the API entry points and handlers for the endpoints and errors
|
||||
This also saves the used host (random localhost IP address) to the data folder in host.txt
|
||||
'''
|
||||
|
||||
|
@ -621,7 +621,7 @@ class OnionrCommunicatorDaemon:
|
||||
def detectAPICrash(self):
|
||||
'''exit if the api server crashes/stops'''
|
||||
if self._core._utils.localCommand('ping', silent=False) not in ('pong', 'pong!'):
|
||||
for i in range(12):
|
||||
for i in range(20):
|
||||
if self._core._utils.localCommand('ping') in ('pong', 'pong!') or self.shutdown:
|
||||
break # break for loop
|
||||
time.sleep(1)
|
||||
|
@ -692,7 +692,7 @@ class Core:
|
||||
createTime = self._utils.getRoundedEpoch()
|
||||
|
||||
# check nonce
|
||||
print(data)
|
||||
#print(data)
|
||||
dataNonce = self._utils.bytesToStr(self._crypto.sha3Hash(data))
|
||||
try:
|
||||
with open(self.dataNonceFile, 'r') as nonces:
|
||||
|
@ -260,6 +260,8 @@ def check():
|
||||
|
||||
if not os.path.exists(os.path.dirname(get_plugins_folder())):
|
||||
logger.debug('Generating plugin data folder...')
|
||||
try:
|
||||
os.makedirs(os.path.dirname(get_plugins_folder()))
|
||||
|
||||
except FileExistsError:
|
||||
pass
|
||||
return
|
||||
|
@ -259,7 +259,6 @@ class POW:
|
||||
self.hashing = False
|
||||
iFound = True
|
||||
self.result = payload
|
||||
print('count', nonce - startNonce)
|
||||
break
|
||||
nonce += 1
|
||||
|
||||
|
@ -157,7 +157,6 @@ class OnionrUtils:
|
||||
'''
|
||||
Read metadata from a block and cache it to the block database
|
||||
'''
|
||||
onionrevents.event('processblocks', data = {'block': myBlock, 'type': blockType, 'signer': signer, 'validSig': valid}, onionr = None)
|
||||
curTime = self.getRoundedEpoch(roundS=60)
|
||||
myBlock = Block(blockHash, self._core)
|
||||
if myBlock.isEncrypted:
|
||||
@ -185,6 +184,7 @@ class OnionrUtils:
|
||||
self._core.updateBlockInfo(blockHash, 'expire', expireTime)
|
||||
if not blockType is None:
|
||||
self._core.updateBlockInfo(blockHash, 'dataType', blockType)
|
||||
onionrevents.event('processblocks', data = {'block': myBlock, 'type': blockType, 'signer': signer, 'validSig': valid}, onionr = None)
|
||||
else:
|
||||
pass
|
||||
#logger.debug('Not processing metadata on encrypted block we cannot decrypt.')
|
||||
|
@ -1 +0,0 @@
|
||||
ecaufnpxx67xmvzwcriohapmmnqbj665h3ynemvwrr2juxl5oa5g7cad.onion
|
@ -6,6 +6,7 @@
|
||||
"minimum_send_pow": 4,
|
||||
"socket_servers": false,
|
||||
"security_level": 0,
|
||||
"hide_created_blocks": true,
|
||||
"max_block_age": 2678400,
|
||||
"bypass_tor_check": false,
|
||||
"public_key": "",
|
||||
|
Loading…
Reference in New Issue
Block a user