confirm transaction => block hash is non zero

pull/20/head
Max Mustermann 4 years ago
parent 751a95375a
commit c731326072
  1. 1
      pyhmy/transaction.py

@ -435,6 +435,7 @@ def send_and_confirm_raw_transaction(signed_tx, endpoint=_default_endpoint, time
while((time.time() - start_time) <= timeout):
tx_response = get_transaction_by_hash(tx_hash)
if tx_response is not None:
if tx_response[ 'blockHash' ] != '0x0000000000000000000000000000000000000000000000000000000000000000':
return tx_response
time.sleep(random.uniform(0.2, 0.5))
raise TxConfirmationTimedoutError("Could not confirm transactions on-chain.")

Loading…
Cancel
Save