From 812381b1d8abb77f14e9d60dbe49408ece062463 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Wed, 18 Apr 2018 21:03:44 -0500 Subject: [PATCH] added check for type error on data check --- onionr/communicator.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/onionr/communicator.py b/onionr/communicator.py index a25df609..3ba3f45b 100755 --- a/onionr/communicator.py +++ b/onionr/communicator.py @@ -52,7 +52,7 @@ class OnionrCommunicate: highFailureTimer = 0 highFailureRate = 10 heartBeatTimer = 0 - heartBeatRate = 5 + heartBeatRate = 0 pexTimer = 25 # How often we should check for new peers pexCount = 0 logger.debug('Communicator debugging enabled.') @@ -167,7 +167,10 @@ class OnionrCommunicate: if currentDB != False: if lastDB != currentDB: logger.debug('Fetching hash from ' + i + ' - ' + currentDB + ' current hash.') - blocks += self.performGet('getBlockHashes', i) + try: + blocks += self.performGet('getBlockHashes', i) + except TypeError: + logger.warn('Failed to get data hash from ' + i) if self._utils.validateHash(currentDB): self._core.setAddressInfo(i, "DBHash", currentDB) if len(blocks.strip()) != 0: