Skip to content

Commit

Permalink
Add comment about checking receipt block hash.
Browse files Browse the repository at this point in the history
  • Loading branch information
pipermerriam authored and kclowes committed Jan 2, 2019
1 parent fb0798a commit 1e56742
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions web3/_utils/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ 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)
# 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)
Expand Down

0 comments on commit 1e56742

Please sign in to comment.