mirror of
https://github.com/FlipsideCrypto/chainwalkers-utils.git
synced 2026-02-06 10:06:43 +00:00
Try without raising
This commit is contained in:
parent
8eca41de20
commit
38f31c9cc0
@ -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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user