From c73132607269be541bb9fa48a21db3cfaa107207 Mon Sep 17 00:00:00 2001 From: Max Mustermann Date: Sun, 2 May 2021 17:07:06 +0530 Subject: [PATCH] confirm transaction => block hash is non zero --- pyhmy/transaction.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyhmy/transaction.py b/pyhmy/transaction.py index fb78bf2..930adf6 100644 --- a/pyhmy/transaction.py +++ b/pyhmy/transaction.py @@ -435,7 +435,8 @@ 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: - return tx_response + if tx_response[ 'blockHash' ] != '0x0000000000000000000000000000000000000000000000000000000000000000': + return tx_response time.sleep(random.uniform(0.2, 0.5)) raise TxConfirmationTimedoutError("Could not confirm transactions on-chain.")