Skip to content
Snippets Groups Projects
Commit 84388e75 authored by Hugo Trentesaux's avatar Hugo Trentesaux Committed by Vincent Texier
Browse files

[fix] fix example code

parent d2979a5f
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,8 @@ from duniterpy.helpers.blockchain import load
bc = load() # gets blockchain iterator
b = next(bc) # gets block
b.number # should return 0
print(f"first block number is: {b.number}") # should return 0
# you can access all properties of this block through it's duniterpy objects attributes
next(bc).number # should return 1
next(bc).number # should return 2 (and so on)
print(f"second block number is: {next(bc).number}") # should return 1
print(f"third block number is: {next(bc).number}") # should return 2
# (and so on)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment