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
10177148
Commit
10177148
authored
6 years ago
by
Holger Nahrstaedt
Browse files
Options
Downloads
Patches
Plain Diff
Some last changes for version 0.19.27
parent
da207b16
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.rst
+8
-5
8 additions, 5 deletions
README.rst
beem/block.py
+6
-4
6 additions, 4 deletions
beem/block.py
with
14 additions
and
9 deletions
README.rst
+
8
−
5
View file @
10177148
...
@@ -16,10 +16,7 @@ The library name is derived from a beam maschine, similar to the analogy between
...
@@ -16,10 +16,7 @@ The library name is derived from a beam maschine, similar to the analogy between
.. image:: https://anaconda.org/conda-forge/beem/badges/version.svg
.. image:: https://anaconda.org/conda-forge/beem/badges/version.svg
:target: https://anaconda.org/conda-forge/beem
:target: https://anaconda.org/conda-forge/beem
.. image:: https://pyup.io/repos/github/holgern/beem/shield.svg
:target: https://pyup.io/repos/github/holgern/beem/
:alt: Updates
.. image:: https://anaconda.org/conda-forge/beem/badges/downloads.svg
.. image:: https://anaconda.org/conda-forge/beem/badges/downloads.svg
:target: https://anaconda.org/conda-forge/beem
:target: https://anaconda.org/conda-forge/beem
...
@@ -42,6 +39,10 @@ Current build status
...
@@ -42,6 +39,10 @@ Current build status
.. image:: https://api.codacy.com/project/badge/Grade/e5476faf97df4c658697b8e7a7efebd7
.. image:: https://api.codacy.com/project/badge/Grade/e5476faf97df4c658697b8e7a7efebd7
:target: https://www.codacy.com/app/holgern/beem?utm_source=github.com&utm_medium=referral&utm_content=holgern/beem&utm_campaign=Badge_Grade
:target: https://www.codacy.com/app/holgern/beem?utm_source=github.com&utm_medium=referral&utm_content=holgern/beem&utm_campaign=Badge_Grade
.. image:: https://pyup.io/repos/github/holgern/beem/shield.svg
:target: https://pyup.io/repos/github/holgern/beem/
:alt: Updates
.. image:: https://api.codeclimate.com/v1/badges/e7bdb5b4aa7ab160a780/test_coverage
.. image:: https://api.codeclimate.com/v1/badges/e7bdb5b4aa7ab160a780/test_coverage
:target: https://codeclimate.com/github/holgern/beem/test_coverage
:target: https://codeclimate.com/github/holgern/beem/test_coverage
:alt: Test Coverage
:alt: Test Coverage
...
@@ -140,8 +141,10 @@ Changelog
...
@@ -140,8 +141,10 @@ Changelog
* blockchain.ops() is obsolete
* blockchain.ops() is obsolete
* only_ops and only_virtual_ops added to blockchain.get_current_block(), blockchain.blocks() and blockchain.stream()
* only_ops and only_virtual_ops added to blockchain.get_current_block(), blockchain.blocks() and blockchain.stream()
* reward, curation, verify added to cli
* reward, curation, verify added to cli
* new curation functions added to
Commit
* new curation functions added to
the Comment class
* Signed_Transaction.verify() fixed, by trying all recover_parameter from 0 to 3
* Signed_Transaction.verify() fixed, by trying all recover_parameter from 0 to 3
* get_potential_signatures, get_transaction_hex and get_required_signatures added to Transactionbuilder
* KeyNotFound is replaced by MissingKeyError and KeyNotFound is removed
0.19.26
0.19.26
-------
-------
...
...
This diff is collapsed.
Click to expand it.
beem/block.py
+
6
−
4
View file @
10177148
...
@@ -23,6 +23,8 @@ class Block(BlockchainObject):
...
@@ -23,6 +23,8 @@ class Block(BlockchainObject):
methods (see below) that allow dealing with a block and it
'
s
methods (see below) that allow dealing with a block and it
'
s
corresponding functions.
corresponding functions.
When only_virtual_ops is set to True, only_ops is always set to True.
Additionally to the block data, the block number is stored as self[
"
id
"
] or self.identifier.
Additionally to the block data, the block number is stored as self[
"
id
"
] or self.identifier.
.. code-block:: python
.. code-block:: python
...
@@ -72,7 +74,7 @@ class Block(BlockchainObject):
...
@@ -72,7 +74,7 @@ class Block(BlockchainObject):
"""
"""
if
not
isinstance
(
self
.
identifier
,
int
):
if
not
isinstance
(
self
.
identifier
,
int
):
self
.
identifier
=
int
(
self
.
identifier
)
self
.
identifier
=
int
(
self
.
identifier
)
if
self
.
only_ops
:
if
self
.
only_ops
or
self
.
only_virtual_ops
:
if
self
.
steem
.
rpc
.
get_use_appbase
():
if
self
.
steem
.
rpc
.
get_use_appbase
():
try
:
try
:
ops
=
self
.
steem
.
rpc
.
get_ops_in_block
({
"
block_num
"
:
self
.
identifier
,
'
only_virtual
'
:
self
.
only_virtual_ops
},
api
=
"
account_history
"
)[
"
ops
"
]
ops
=
self
.
steem
.
rpc
.
get_ops_in_block
({
"
block_num
"
:
self
.
identifier
,
'
only_virtual
'
:
self
.
only_virtual_ops
},
api
=
"
account_history
"
)[
"
ops
"
]
...
@@ -106,7 +108,7 @@ class Block(BlockchainObject):
...
@@ -106,7 +108,7 @@ class Block(BlockchainObject):
@property
@property
def
transactions
(
self
):
def
transactions
(
self
):
"""
Returns all transactions as list
"""
"""
Returns all transactions as list
"""
if
self
.
only_ops
:
if
self
.
only_ops
or
self
.
only_virtual_ops
:
return
None
return
None
trxs
=
self
[
"
transactions
"
]
trxs
=
self
[
"
transactions
"
]
for
i
in
range
(
len
(
trxs
)):
for
i
in
range
(
len
(
trxs
)):
...
@@ -120,7 +122,7 @@ class Block(BlockchainObject):
...
@@ -120,7 +122,7 @@ class Block(BlockchainObject):
@property
@property
def
operations
(
self
):
def
operations
(
self
):
"""
Returns all block operations as list
"""
"""
Returns all block operations as list
"""
if
self
.
only_ops
:
if
self
.
only_ops
or
self
.
only_virtual_ops
:
return
self
[
"
operations
"
]
return
self
[
"
operations
"
]
ops
=
[]
ops
=
[]
trxs
=
self
[
"
transactions
"
]
trxs
=
self
[
"
transactions
"
]
...
@@ -140,7 +142,7 @@ class Block(BlockchainObject):
...
@@ -140,7 +142,7 @@ class Block(BlockchainObject):
ops_stat
[
key
]
=
0
ops_stat
[
key
]
=
0
else
:
else
:
ops_stat
=
add_to_ops_stat
.
copy
()
ops_stat
=
add_to_ops_stat
.
copy
()
if
self
.
only_ops
:
if
self
.
only_ops
or
self
.
only_virtual_ops
:
for
op
in
self
[
"
operations
"
]:
for
op
in
self
[
"
operations
"
]:
ops_stat
[
op
[
"
op
"
][
0
]]
+=
1
ops_stat
[
op
[
"
op
"
][
0
]]
+=
1
return
ops_stat
return
ops_stat
...
...
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