Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/subscriptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ When you subscribe to an event – new block headers, for example – you'll rec
print(response)

# unsubscribe:
if response["number"] > 42012345:
new_head = response["result"]
if new_head["number"] > 42012345:
await w3.eth.unsubscribe(subscription_id)
break

Expand Down
1 change: 1 addition & 0 deletions newsfragments/3850.docs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix the introductory subscription example to read the block number from the formatted subscription response result.