Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DuniterPy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
python
DuniterPy
Commits
9de47432
"runtime/common/src/fees.rs" did not exist on "7db81f928b53974978d22da2350b4826d95ccffc"
Commit
9de47432
authored
4 years ago
by
Hugo Trentesaux
Committed by
Vincent Texier
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[fix] fix example code
parent
3aa8848a
No related branches found
No related tags found
2 merge requests
!128
Release 0.62.0
,
!124
#130: Support reading Duniter's local json blockchain
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/load_local_blockchain.py
+4
-3
4 additions, 3 deletions
examples/load_local_blockchain.py
with
4 additions
and
3 deletions
examples/load_local_blockchain.py
+
4
−
3
View file @
9de47432
...
@@ -23,7 +23,8 @@ from duniterpy.helpers.blockchain import load
...
@@ -23,7 +23,8 @@ from duniterpy.helpers.blockchain import load
bc
=
load
()
# gets blockchain iterator
bc
=
load
()
# gets blockchain iterator
b
=
next
(
bc
)
# gets block
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
# you can access all properties of this block through it's duniterpy objects attributes
next
(
bc
).
number
# should return 1
print
(
f
"
second block number is:
{
next
(
bc
).
number
}
"
)
# should return 1
next
(
bc
).
number
# should return 2 (and so on)
print
(
f
"
third block number is:
{
next
(
bc
).
number
}
"
)
# should return 2
# (and so on)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment