fixing type error in cases of new block heights. the service crashed because of connection issues. instead of crashes, we restart the service now.

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
Jürgen Eckel 2023-05-23 15:15:17 +02:00
parent 3e223f04cd
commit 2983a70fe4
No known key found for this signature in database

View File

@ -239,7 +239,6 @@ class ApplicationLogic(BaseApplication):
block = self.validator.models.get_latest_block()
logger.debug("BLOCK: ", block)
if self.block_txn_ids:
self.block_txn_hash = calculate_hash([block["app_hash"], block_txn_hash])
else:
@ -250,6 +249,8 @@ class ApplicationLogic(BaseApplication):
sys.exit(1)
except ValueError:
sys.exit(1)
except TypeError:
sys.exit(1)
return ResponseEndBlock(validator_updates=validator_update)