Commit 5dbdefaa authored by James Lawton's avatar James Lawton
Browse files

moved parity api lookup

parent 35f25d3e
......@@ -70,11 +70,6 @@ class EthereumSCServiceProviderConnector(ServiceProviderConnector):
def create_transaction(self, method, recipient_address, token_uri, blockchain_bytes, attempt_number):
try:
currentNonce = self.get_current_nonce()
except Exception:
raise print('Couldnt get current nonce')
gas_limit = self.cost_constants.get_gas_limit()
estimated_gas = self._contract_obj.functions[method](recipient_address, token_uri, blockchain_bytes).estimateGas() * 5
if estimated_gas > gas_limit:
......@@ -95,6 +90,12 @@ class EthereumSCServiceProviderConnector(ServiceProviderConnector):
#Consistent nonce with incremental, doesnt work with concurrency
nonceIncremental = self._w3.eth.getTransactionCount(self._w3.eth.defaultAccount)
try:
currentNonce = self.get_current_nonce()
except Exception:
raise print('Couldnt get current nonce')
print("current Nonce: ", currentNonce)
#Using request to parity node for current nonce.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment