Fixed spam for block processing
parent
2219be9ae3
commit
c674e2d281
|
@ -579,7 +579,6 @@ class API:
|
|||
else:
|
||||
validSig = False
|
||||
signer = self._core._utils.bytesToStr(bl.signer)
|
||||
#print(signer, bl.isSigned(), self._core._utils.validatePubKey(signer), bl.isSigner(signer))
|
||||
if bl.isSigned() and self._core._utils.validatePubKey(signer) and bl.isSigner(signer):
|
||||
validSig = True
|
||||
bl.bheader['validSig'] = validSig
|
||||
|
|
|
@ -157,6 +157,7 @@ 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:
|
||||
|
@ -171,7 +172,6 @@ class OnionrUtils:
|
|||
try:
|
||||
if len(blockType) <= 10:
|
||||
self._core.updateBlockInfo(blockHash, 'dataType', blockType)
|
||||
onionrevents.event('processblocks', data = {'block': myBlock, 'type': blockType, 'signer': signer, 'validSig': valid}, onionr = None)
|
||||
except TypeError:
|
||||
logger.warn("Missing block information")
|
||||
pass
|
||||
|
|
|
@ -45,7 +45,6 @@ def on_processblocks(api, data=None):
|
|||
# Generally fired by utils.
|
||||
myBlock = api.data['block']
|
||||
blockType = api.data['type']
|
||||
|
||||
# Process specific block types
|
||||
|
||||
# forwardKey blocks, add a new forward secrecy key for a peer
|
||||
|
|
Loading…
Reference in New Issue