logging is less spammy, file disabled by default, and we dont try to scan encrypted blocks that aren't for us
This commit is contained in:
parent
8dbaac2198
commit
b5fecdf1e8
@ -515,7 +515,7 @@ class API:
|
|||||||
while len(self._core.hsAddress) == 0:
|
while len(self._core.hsAddress) == 0:
|
||||||
self._core.refreshFirstStartVars()
|
self._core.refreshFirstStartVars()
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
self.http_server = WSGIServer((self.host, bindPort), app)
|
self.http_server = WSGIServer((self.host, bindPort), app, log=None)
|
||||||
self.http_server.serve_forever()
|
self.http_server.serve_forever()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
pass
|
pass
|
||||||
|
@ -263,18 +263,21 @@ class OnionrUtils:
|
|||||||
myBlock = Block(blockHash, self._core)
|
myBlock = Block(blockHash, self._core)
|
||||||
if myBlock.isEncrypted:
|
if myBlock.isEncrypted:
|
||||||
myBlock.decrypt()
|
myBlock.decrypt()
|
||||||
blockType = myBlock.getMetadata('type') # we would use myBlock.getType() here, but it is bugged with encrypted blocks
|
if myBlock.decrypted:
|
||||||
signer = self.bytesToStr(myBlock.signer)
|
blockType = myBlock.getMetadata('type') # we would use myBlock.getType() here, but it is bugged with encrypted blocks
|
||||||
valid = myBlock.verifySig()
|
signer = self.bytesToStr(myBlock.signer)
|
||||||
try:
|
valid = myBlock.verifySig()
|
||||||
if len(blockType) <= 10:
|
try:
|
||||||
self._core.updateBlockInfo(blockHash, 'dataType', blockType)
|
if len(blockType) <= 10:
|
||||||
|
self._core.updateBlockInfo(blockHash, 'dataType', blockType)
|
||||||
|
|
||||||
onionrevents.event('processblocks', data = {'block': myBlock, 'type': blockType, 'signer': signer, 'validSig': valid}, onionr = None)
|
onionrevents.event('processblocks', data = {'block': myBlock, 'type': blockType, 'signer': signer, 'validSig': valid}, onionr = None)
|
||||||
|
|
||||||
except TypeError:
|
except TypeError:
|
||||||
logger.warn("Missing block information")
|
logger.warn("Missing block information")
|
||||||
pass
|
pass
|
||||||
|
else:
|
||||||
|
logger.debug('Not processing metadata on encrypted block we cannot decrypt.')
|
||||||
|
|
||||||
def escapeAnsi(self, line):
|
def escapeAnsi(self, line):
|
||||||
'''
|
'''
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
"log": {
|
"log": {
|
||||||
"file": {
|
"file": {
|
||||||
"output": true,
|
"output": false,
|
||||||
"path": "data/output.log"
|
"path": "data/output.log"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user