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
2a25cb4c
Commit
2a25cb4c
authored
7 years ago
by
Holger Nahrstaedt
Browse files
Options
Downloads
Patches
Plain Diff
Fix python 2.7
Use threading only if futures is installed.
parent
614c1774
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
+7
-0
7 additions, 0 deletions
README.rst
beem/blockchain.py
+8
-3
8 additions, 3 deletions
beem/blockchain.py
with
15 additions
and
3 deletions
README.rst
+
7
−
0
View file @
2a25cb4c
...
@@ -117,6 +117,13 @@ Documentation is available at http://beem.readthedocs.io/en/latest/
...
@@ -117,6 +117,13 @@ Documentation is available at http://beem.readthedocs.io/en/latest/
Changelog
Changelog
=========
=========
0.19.11
-------
* beem is appbase ready
* more examples added
* print_appbase_calls added
* https nodes can be used
0.19.10
0.19.10
-------
-------
* Memo encryption/decryption fixed
* Memo encryption/decryption fixed
...
...
This diff is collapsed.
Click to expand it.
beem/blockchain.py
+
8
−
3
View file @
2a25cb4c
...
@@ -7,15 +7,20 @@ from future.utils import python_2_unicode_compatible
...
@@ -7,15 +7,20 @@ from future.utils import python_2_unicode_compatible
from
builtins
import
str
from
builtins
import
str
from
builtins
import
range
from
builtins
import
range
from
builtins
import
object
from
builtins
import
object
from
concurrent.futures
import
ThreadPoolExecutor
,
wait
,
as_completed
import
time
import
time
from
.block
import
Block
from
.block
import
Block
from
.blockchainobject
import
BlockchainObject
from
.blockchainobject
import
BlockchainObject
from
beem.instance
import
shared_steem_instance
from
beem.instance
import
shared_steem_instance
from
beembase.operationids
import
getOperationNameForId
from
.amount
import
Amount
from
.amount
import
Amount
from
datetime
import
datetime
,
timedelta
from
datetime
import
datetime
,
timedelta
import
math
import
math
FUTURES_MODULE
=
None
if
not
FUTURES_MODULE
:
try
:
from
concurrent.futures
import
ThreadPoolExecutor
,
wait
,
as_completed
FUTURES_MODULE
=
"
futures
"
except
ImportError
:
FUTURES_MODULE
=
None
@python_2_unicode_compatible
@python_2_unicode_compatible
...
@@ -180,7 +185,7 @@ class Blockchain(object):
...
@@ -180,7 +185,7 @@ class Blockchain(object):
head_block
=
stop
head_block
=
stop
else
:
else
:
head_block
=
self
.
get_current_block_num
()
head_block
=
self
.
get_current_block_num
()
if
threading
:
if
threading
and
FUTURES_MODULE
:
pool
=
ThreadPoolExecutor
(
2
)
pool
=
ThreadPoolExecutor
(
2
)
latest_block
=
0
latest_block
=
0
for
blocknum
in
range
(
start
,
head_block
+
1
,
thread_num
):
for
blocknum
in
range
(
start
,
head_block
+
1
,
thread_num
):
...
...
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