Skip to content

Commit

Permalink
microblocks (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabhdaga-merkle authored Jan 24, 2022
1 parent 26f4847 commit f969dd8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zilliqaetl/service/zilliqa_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit f969dd8

Please sign in to comment.