Skip to content
Snippets Groups Projects
Commit 892cb3f2 authored by Jake Taylor's avatar Jake Taylor :lips:
Browse files

Merge branch 'hotfix/Crash' into 'master'

fix crash

See merge request !7
parents 7c42531b 92b11123
No related branches found
No related tags found
1 merge request!7fix crash
......@@ -12,7 +12,7 @@ import logging as log
import psycopg2
import sys
import os
from substrateinterface import SubstrateInterface, Keypair
from substrateinterface import SubstrateInterface, Keypair, exceptions
import time
#############
......@@ -391,6 +391,10 @@ def push_point_info(substrate, call_function, keypair, wallet_points):
extrinsic = substrate.create_signed_extrinsic(call=call, keypair=keypair)
try:
receipt = substrate.submit_extrinsic(extrinsic, wait_for_inclusion=True)
except exceptions.SubstrateRequestException as e:
# Force a restart of the chain connection at the top level and retry
log.error(f"Failed to push_point_info: {e}")
raise ConnectionError("Invalid RPC request")
except Exception as e:
log.error(f"Failed to push_point_info: {extrinsic}")
raise e
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment