Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
beem
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
hive
beem
Commits
ecb84443
Commit
ecb84443
authored
6 years ago
by
crokkon
Browse files
Options
Downloads
Patches
Plain Diff
beem/blockchain.py: documentation update
parent
7ee44fd6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
beem/blockchain.py
+17
-14
17 additions, 14 deletions
beem/blockchain.py
with
17 additions
and
14 deletions
beem/blockchain.py
+
17
−
14
View file @
ecb84443
...
...
@@ -119,7 +119,7 @@ class Blockchain(object):
"""
This call returns the current block number
.. note:: The block number returned depends on the ``mode`` used
when instan
c
iating from this class.
when instan
t
iating from this class.
"""
props
=
self
.
steem
.
get_dynamic_global_properties
(
False
)
if
props
is
None
:
...
...
@@ -133,7 +133,7 @@ class Blockchain(object):
:param bool only_virtual_ops: Includes only virtual operations (default: False)
.. note:: The block number returned depends on the ``mode`` used
when instan
c
iating from this class.
when instan
t
iating from this class.
"""
return
Block
(
self
.
get_current_block_num
(),
...
...
@@ -148,7 +148,7 @@ class Blockchain(object):
:param datetime date: block time for which a block number is estimated
.. note:: The block number returned depends on the ``mode`` used
when instan
c
iating from this class.
when instan
t
iating from this class.
"""
last_block
=
self
.
get_current_block
()
date
=
addTzInfo
(
date
)
...
...
@@ -196,7 +196,7 @@ class Blockchain(object):
def
block_timestamp
(
self
,
block_num
):
"""
Returns the timestamp of the block with the given block
number.
number
as integer
.
:param int block_num: Block number
"""
...
...
@@ -212,10 +212,11 @@ class Blockchain(object):
:param int start: Starting block
:param int stop: Stop at this block
:param int max_batch_size: only for appbase nodes. When not None, batch calls of are used.
Cannot combine with threading
Cannot
be
combine
d
with threading
:param bool threading: Enables threading. Cannot be combined with batch calls
:param int thread_num: Defines the number of threads, when `threading` is set.
:param bool only_ops: Only yielding operations, when set to True (default: False)
:param bool only_ops: Only yield operations (default: False).
Cannot be combined with ``only_virtual_ops=True``.
:param bool only_virtual_ops: Only yield virtual operations (default: False)
.. note:: If you want instant confirmation, you need to instantiate
...
...
@@ -378,7 +379,7 @@ class Blockchain(object):
raise
DeprecationWarning
(
'
Blockchain.ops() is deprecated. Please use Blockchain.stream() instead.
'
)
def
ops_statistics
(
self
,
start
,
stop
=
None
,
add_to_ops_stat
=
None
,
verbose
=
False
):
"""
Generates
a
statistics for all operations (including virtual operations) starting from
"""
Generates statistics for all operations (including virtual operations) starting from
``start``.
:param int start: Starting block
...
...
@@ -411,20 +412,20 @@ class Blockchain(object):
"""
Yield specific operations (e.g. comments) only
:param array opNames: List of operations to filter for
:param bool raw_ops: When set to True, it returns the unmodified operations as the
deprecated ops() function
:param bool raw_ops: When set to True, it returns the unmodified operations (default: False)
:param int start: Start at this block
:param int stop: Stop at this block
:param int max_batch_size: only for appbase nodes. When not None, batch calls of are used.
Cannot combine with threading
Cannot
be
combine
d
with threading
:param bool threading: Enables threading. Cannot be combined with batch calls
:param int thread_num: Defines the number of threads, when `threading` is set.
:param bool only_ops: Only yielding operations, when set to True (default: False)
:param bool only_ops: Only yield operations (default: False)
Cannot be combined with ``only_virtual_ops=True``
:param bool only_virtual_ops: Only yield virtual operations (default: False)
The dict output is formated such that ``type`` caries the
operation type
, t
imestamp and block_num are taken from the
block the operation was stored in and the other key depend
The dict output is formated such that ``type`` car
r
ies the
operation type
. T
imestamp and block_num are taken from the
block the operation was stored in and the other key
s
depend
on the actualy operation.
.. note:: If you want instant confirmation, you need to instantiate
...
...
@@ -509,6 +510,8 @@ class Blockchain(object):
def
awaitTxConfirmation
(
self
,
transaction
,
limit
=
10
):
"""
Returns the transaction as seen by the blockchain after being
included into a block
:param dict transaction: transaction to wait for
:param int limit: (optional) number of blocks to wait for the transaction (default: 10)
.. note:: If you want instant confirmation, you need to instantiate
class:`beem.blockchain.Blockchain` with
...
...
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