From 2983a70fe4ea7d1ed3db6bcd2dc261ca88927035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Eckel?= Date: Tue, 23 May 2023 15:15:17 +0200 Subject: [PATCH] fixing type error in cases of new block heights. the service crashed because of connection issues. instead of crashes, we restart the service now. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jürgen Eckel --- planetmint/abci/application_logic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/planetmint/abci/application_logic.py b/planetmint/abci/application_logic.py index 9ed537a..6a4f410 100644 --- a/planetmint/abci/application_logic.py +++ b/planetmint/abci/application_logic.py @@ -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)