Try without raising

This commit is contained in:
Omkar Bhat 2021-03-25 07:49:21 -06:00
parent 8eca41de20
commit 38f31c9cc0

View File

@ -31,15 +31,12 @@ class TendermintRPC:
print(f'An error occured retrieving the results of block height: {err}')
def get_transactions_by_block(self, height, limit=None, page=1):
try:
if limit is not None:
response = requests.get(self.node_url + '/tx_search?query=\"tx.height=' + str(height) + '\"&prove=true&per_page=' + str(limit) + '&page=' + str(page))
else:
response = requests.get(self.node_url + '/tx_search?query=\"tx.height=' + str(height) + '\"&prove=true&page=' + str(page))
data = response.json()
return data['result']
except Exception as err:
print(f'An error occured retrieving the transactions in block: {err}')
if limit is not None:
response = requests.get(self.node_url + '/tx_search?query=\"tx.height=' + str(height) + '\"&prove=true&per_page=' + str(limit) + '&page=' + str(page))
else:
response = requests.get(self.node_url + '/tx_search?query=\"tx.height=' + str(height) + '\"&prove=true&page=' + str(page))
data = response.json()
return data['result']
def get_transactions_by_hash(self, tx_hash, hex_prefix=False):
try: