diff --git a/web3/_utils/transactions.py b/web3/_utils/transactions.py index c48d1a2024..a6a896f0ab 100644 --- a/web3/_utils/transactions.py +++ b/web3/_utils/transactions.py @@ -65,7 +65,11 @@ def wait_for_transaction_receipt(web3, txn_hash, timeout=120, poll_latency=0.1): with Timeout(timeout) as _timeout: while True: txn_receipt = web3.eth.getTransactionReceipt(txn_hash) - if txn_receipt is not None: + # FIXME: The check for a null `blockHash` is due to parity's + # non-standard implementation of the JSON-RPC API and should + # be removed once the formal spec for the JSON-RPC endpoints + # has been finalized. + if txn_receipt is not None and txn_receipt['blockHash'] is not None: break _timeout.sleep(poll_latency) return txn_receipt