From f969dd84c1879b04351582dc2ea7f05a6e693358 Mon Sep 17 00:00:00 2001 From: saurabhdaga-merkle <55530487+saurabhdaga-merkle@users.noreply.github.com> Date: Mon, 24 Jan 2022 15:40:22 +0530 Subject: [PATCH] microblocks (#13) --- zilliqaetl/service/zilliqa_service.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zilliqaetl/service/zilliqa_service.py b/zilliqaetl/service/zilliqa_service.py index 25d338b..a8bb288 100644 --- a/zilliqaetl/service/zilliqa_service.py +++ b/zilliqaetl/service/zilliqa_service.py @@ -23,6 +23,7 @@ TXN_HASH_NOT_PRESENT = "Txn Hash not Present" TX_BLOCK_NO_TRANSACTIONS = "TxBlock has no transactions" +NO_MICROBLOCKS = "Failed to get Microblock" class ZilliqaService(object): def __init__(self, zilliqa_api): @@ -52,7 +53,7 @@ def get_transactions(self, block_number): except APIError as e: if str(e) == TXN_HASH_NOT_PRESENT: return self.get_validated_transactions(block_number) - if str(e) == TX_BLOCK_NO_TRANSACTIONS: + if str(e) == TX_BLOCK_NO_TRANSACTIONS or str(e) == NO_MICROBLOCKS: return [] raise e