Network status update part 2

- only update processed items every 2 seconds
This commit is contained in:
Peter Šurda 2017-05-31 10:16:30 +02:00
parent e522f015a8
commit 2555f692eb
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -181,8 +181,8 @@ class objectProcessor(threading.Thread):
def processpubkey(self, data): def processpubkey(self, data):
pubkeyProcessingStartTime = time.time() pubkeyProcessingStartTime = time.time()
shared.numberOfPubkeysProcessed += 1 shared.numberOfPubkeysProcessed += 1
queues.UISignalQueue.put(( # queues.UISignalQueue.put((
'updateNumberOfPubkeysProcessed', 'no data')) # 'updateNumberOfPubkeysProcessed', 'no data'))
embeddedTime, = unpack('>Q', data[8:16]) embeddedTime, = unpack('>Q', data[8:16])
readPosition = 20 # bypass the nonce, time, and object type readPosition = 20 # bypass the nonce, time, and object type
addressVersion, varintLength = decodeVarint( addressVersion, varintLength = decodeVarint(
@ -330,8 +330,8 @@ class objectProcessor(threading.Thread):
def processmsg(self, data): def processmsg(self, data):
messageProcessingStartTime = time.time() messageProcessingStartTime = time.time()
shared.numberOfMessagesProcessed += 1 shared.numberOfMessagesProcessed += 1
queues.UISignalQueue.put(( # queues.UISignalQueue.put((
'updateNumberOfMessagesProcessed', 'no data')) # 'updateNumberOfMessagesProcessed', 'no data'))
readPosition = 20 # bypass the nonce, time, and object type readPosition = 20 # bypass the nonce, time, and object type
msgVersion, msgVersionLength = decodeVarint(data[readPosition:readPosition + 9]) msgVersion, msgVersionLength = decodeVarint(data[readPosition:readPosition + 9])
if msgVersion != 1: if msgVersion != 1:
@ -600,8 +600,8 @@ class objectProcessor(threading.Thread):
def processbroadcast(self, data): def processbroadcast(self, data):
messageProcessingStartTime = time.time() messageProcessingStartTime = time.time()
shared.numberOfBroadcastsProcessed += 1 shared.numberOfBroadcastsProcessed += 1
queues.UISignalQueue.put(( # queues.UISignalQueue.put((
'updateNumberOfBroadcastsProcessed', 'no data')) # 'updateNumberOfBroadcastsProcessed', 'no data'))
inventoryHash = calculateInventoryHash(data) inventoryHash = calculateInventoryHash(data)
readPosition = 20 # bypass the nonce, time, and object type readPosition = 20 # bypass the nonce, time, and object type
broadcastVersion, broadcastVersionLength = decodeVarint( broadcastVersion, broadcastVersionLength = decodeVarint(