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
3c78ac8d
Commit
3c78ac8d
authored
6 years ago
by
Holger
Browse files
Options
Downloads
Patches
Plain Diff
Replace recursive call by while loop
* Update nodes in Nodelist * Disable seed.bitcoiner.me node
parent
d1b15a92
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
beem/account.py
+28
-17
28 additions, 17 deletions
beem/account.py
beem/nodelist.py
+29
-29
29 additions, 29 deletions
beem/nodelist.py
with
57 additions
and
46 deletions
beem/account.py
+
28
−
17
View file @
3c78ac8d
...
@@ -637,23 +637,34 @@ class Account(BlockchainObject):
...
@@ -637,23 +637,34 @@ class Account(BlockchainObject):
"""
"""
if
not
self
.
steem
.
is_connected
():
if
not
self
.
steem
.
is_connected
():
raise
OfflineHasNoRPCException
(
"
No RPC available in offline mode!
"
)
raise
OfflineHasNoRPCException
(
"
No RPC available in offline mode!
"
)
self
.
steem
.
rpc
.
set_next_node_on_empty_reply
(
False
)
followers_list
=
[]
if
self
.
steem
.
rpc
.
get_use_appbase
():
limit_reached
=
True
query
=
{
'
account
'
:
self
.
name
,
'
start
'
:
last_user
,
'
type
'
:
what
,
'
limit
'
:
limit
}
cnt
=
0
if
direction
==
"
follower
"
:
while
limit_reached
:
followers
=
self
.
steem
.
rpc
.
get_followers
(
query
,
api
=
'
follow
'
)[
'
followers
'
]
self
.
steem
.
rpc
.
set_next_node_on_empty_reply
(
False
)
elif
direction
==
"
following
"
:
if
self
.
steem
.
rpc
.
get_use_appbase
():
followers
=
self
.
steem
.
rpc
.
get_following
(
query
,
api
=
'
follow
'
)[
'
following
'
]
query
=
{
'
account
'
:
self
.
name
,
'
start
'
:
last_user
,
'
type
'
:
what
,
'
limit
'
:
limit
}
else
:
if
direction
==
"
follower
"
:
if
direction
==
"
follower
"
:
followers
=
self
.
steem
.
rpc
.
get_followers
(
query
,
api
=
'
follow
'
)[
'
followers
'
]
followers
=
self
.
steem
.
rpc
.
get_followers
(
self
.
name
,
last_user
,
what
,
limit
,
api
=
'
follow
'
)
elif
direction
==
"
following
"
:
elif
direction
==
"
following
"
:
followers
=
self
.
steem
.
rpc
.
get_following
(
query
,
api
=
'
follow
'
)[
'
following
'
]
followers
=
self
.
steem
.
rpc
.
get_following
(
self
.
name
,
last_user
,
what
,
limit
,
api
=
'
follow
'
)
else
:
if
direction
==
"
follower
"
:
if
len
(
followers
)
>=
limit
:
followers
=
self
.
steem
.
rpc
.
get_followers
(
self
.
name
,
last_user
,
what
,
limit
,
api
=
'
follow
'
)
followers
+=
self
.
_get_followers
(
elif
direction
==
"
following
"
:
direction
=
direction
,
last_user
=
followers
[
-
1
][
direction
])[
1
:]
followers
=
self
.
steem
.
rpc
.
get_following
(
self
.
name
,
last_user
,
what
,
limit
,
api
=
'
follow
'
)
return
followers
if
cnt
==
0
:
followers_list
=
followers
elif
len
(
followers
)
>
1
:
followers_list
+=
followers
[
1
:]
if
len
(
followers
)
>=
limit
:
last_user
=
followers
[
-
1
][
direction
]
limit_reached
=
True
cnt
+=
1
else
:
limit_reached
=
False
return
followers_list
@property
@property
def
available_balances
(
self
):
def
available_balances
(
self
):
...
...
This diff is collapsed.
Click to expand it.
beem/nodelist.py
+
29
−
29
View file @
3c78ac8d
...
@@ -28,42 +28,42 @@ class NodeList(list):
...
@@ -28,42 +28,42 @@ class NodeList(list):
nodes
=
[
nodes
=
[
{
{
"
url
"
:
"
https://api.steemit.com
"
,
"
url
"
:
"
https://api.steemit.com
"
,
"
version
"
:
"
0.19.
4
"
,
"
version
"
:
"
0.19.
10
"
,
"
type
"
:
"
appbase
"
,
"
type
"
:
"
appbase
"
,
"
owner
"
:
"
steemit
"
,
"
owner
"
:
"
steemit
"
,
"
score
"
:
100
"
score
"
:
100
},
},
{
{
"
url
"
:
"
wss://appbasetest.timcliff.com
"
,
"
url
"
:
"
wss://appbasetest.timcliff.com
"
,
"
version
"
:
"
0.19.
4
"
,
"
version
"
:
"
0.19.
10
"
,
"
type
"
:
"
appbase
"
,
"
type
"
:
"
appbase
"
,
"
owner
"
:
"
timcliff
"
,
"
owner
"
:
"
timcliff
"
,
"
score
"
:
20
"
score
"
:
20
},
},
{
{
"
url
"
:
"
https://appbasetest.timcliff.com
"
,
"
url
"
:
"
https://appbasetest.timcliff.com
"
,
"
version
"
:
"
0.19.
4
"
,
"
version
"
:
"
0.19.
10
"
,
"
type
"
:
"
appbase
"
,
"
type
"
:
"
appbase
"
,
"
owner
"
:
"
timcliff
"
,
"
owner
"
:
"
timcliff
"
,
"
score
"
:
10
"
score
"
:
10
},
},
{
{
"
url
"
:
"
https://api.steem.house
"
,
"
url
"
:
"
https://api.steem.house
"
,
"
version
"
:
"
0.19.
4
"
,
"
version
"
:
"
0.19.
10
"
,
"
type
"
:
"
appbase
"
,
"
type
"
:
"
appbase
"
,
"
owner
"
:
"
gtg
"
,
"
owner
"
:
"
gtg
"
,
"
score
"
:
90
"
score
"
:
90
},
},
{
{
"
url
"
:
"
https://api.steemitdev.com
"
,
"
url
"
:
"
https://api.steemitdev.com
"
,
"
version
"
:
"
0.19.
4
"
,
"
version
"
:
"
0.19.
10
"
,
"
type
"
:
"
appbase-dev
"
,
"
type
"
:
"
appbase-dev
"
,
"
owner
"
:
"
steemit
"
,
"
owner
"
:
"
steemit
"
,
"
score
"
:
100
"
score
"
:
100
},
},
{
{
"
url
"
:
"
https://api.steemitstage.com
"
,
"
url
"
:
"
https://api.steemitstage.com
"
,
"
version
"
:
"
0.19.
4
"
,
"
version
"
:
"
0.19.
10
"
,
"
type
"
:
"
appbase-dev
"
,
"
type
"
:
"
appbase-dev
"
,
"
owner
"
:
"
steemit
"
,
"
owner
"
:
"
steemit
"
,
"
score
"
:
110
"
score
"
:
110
...
@@ -73,98 +73,98 @@ class NodeList(list):
...
@@ -73,98 +73,98 @@ class NodeList(list):
"
version
"
:
"
0.19.3
"
,
"
version
"
:
"
0.19.3
"
,
"
type
"
:
"
normal
"
,
"
type
"
:
"
normal
"
,
"
owner
"
:
"
ausbitbank
"
,
"
owner
"
:
"
ausbitbank
"
,
"
score
"
:
1
25
"
score
"
:
1
},
},
{
{
"
url
"
:
"
https://rpc.steemviz.com
"
,
"
url
"
:
"
https://rpc.steemviz.com
"
,
"
version
"
:
"
0.19.3
"
,
"
version
"
:
"
0.19.3
"
,
"
type
"
:
"
normal
"
,
"
type
"
:
"
normal
"
,
"
owner
"
:
"
ausbitbank
"
,
"
owner
"
:
"
ausbitbank
"
,
"
score
"
:
80
"
score
"
:
1
},
},
{
{
"
url
"
:
"
wss://steemd.privex.io
"
,
"
url
"
:
"
wss://steemd.privex.io
"
,
"
version
"
:
"
0.19.
3
"
,
"
version
"
:
"
0.19.
5
"
,
"
type
"
:
"
normal
"
,
"
type
"
:
"
normal
"
,
"
owner
"
:
"
privex
"
,
"
owner
"
:
"
privex
"
,
"
score
"
:
150
"
score
"
:
150
},
},
{
{
"
url
"
:
"
https://steemd.privex.io
"
,
"
url
"
:
"
https://steemd.privex.io
"
,
"
version
"
:
"
0.19.
3
"
,
"
version
"
:
"
0.19.
5
"
,
"
type
"
:
"
normal
"
,
"
type
"
:
"
normal
"
,
"
owner
"
:
"
privex
"
,
"
owner
"
:
"
privex
"
,
"
score
"
:
50
"
score
"
:
50
},
},
{
{
"
url
"
:
"
wss://rpc.buildteam.io
"
,
"
url
"
:
"
wss://rpc.buildteam.io
"
,
"
version
"
:
"
0.19.
3
"
,
"
version
"
:
"
0.19.
5
"
,
"
type
"
:
"
normal
"
,
"
type
"
:
"
normal
"
,
"
owner
"
:
"
themarkymark
"
,
"
owner
"
:
"
themarkymark
"
,
"
score
"
:
165
"
score
"
:
165
},
},
{
{
"
url
"
:
"
https://rpc.buildteam.io
"
,
"
url
"
:
"
https://rpc.buildteam.io
"
,
"
version
"
:
"
0.19.
3
"
,
"
version
"
:
"
0.19.
5
"
,
"
type
"
:
"
normal
"
,
"
type
"
:
"
normal
"
,
"
owner
"
:
"
themarkymark
"
,
"
owner
"
:
"
themarkymark
"
,
"
score
"
:
120
"
score
"
:
120
},
},
{
{
"
url
"
:
"
wss://gtg.steem.house:8090
"
,
"
url
"
:
"
wss://gtg.steem.house:8090
"
,
"
version
"
:
"
0.19.
3
"
,
"
version
"
:
"
0.19.
5
"
,
"
type
"
:
"
normal
"
,
"
type
"
:
"
normal
"
,
"
owner
"
:
"
gtg
"
,
"
owner
"
:
"
gtg
"
,
"
score
"
:
75
"
score
"
:
75
},
},
{
{
"
url
"
:
"
https://gtg.steem.house:8090
"
,
"
url
"
:
"
https://gtg.steem.house:8090
"
,
"
version
"
:
"
0.19.
3
"
,
"
version
"
:
"
0.19.
5
"
,
"
type
"
:
"
normal
"
,
"
type
"
:
"
normal
"
,
"
owner
"
:
"
gtg
"
,
"
owner
"
:
"
gtg
"
,
"
score
"
:
80
"
score
"
:
80
},
},
{
{
"
url
"
:
"
wss://steemd.pevo.science
"
,
"
url
"
:
"
wss://steemd.pevo.science
"
,
"
version
"
:
"
0.19.
3
"
,
"
version
"
:
"
0.19.
2
"
,
"
type
"
:
"
normal
"
,
"
type
"
:
"
normal
"
,
"
owner
"
:
"
pharesim
"
,
"
owner
"
:
"
pharesim
"
,
"
score
"
:
1
7
0
"
score
"
:
10
},
},
{
{
"
url
"
:
"
https://steemd.pevo.science
"
,
"
url
"
:
"
https://steemd.pevo.science
"
,
"
version
"
:
"
0.19.3
"
,
"
version
"
:
"
0.19.3
"
,
"
type
"
:
"
normal
"
,
"
type
"
:
"
normal
"
,
"
owner
"
:
"
pharesim
"
,
"
owner
"
:
"
pharesim
"
,
"
score
"
:
3
0
"
score
"
:
1
0
},
},
{
{
"
url
"
:
"
wss://rpc.steemliberator.com
"
,
"
url
"
:
"
wss://rpc.steemliberator.com
"
,
"
version
"
:
"
0.19.
3
"
,
"
version
"
:
"
0.19.
5
"
,
"
type
"
:
"
normal
"
,
"
type
"
:
"
normal
"
,
"
owner
"
:
"
netuoso
"
,
"
owner
"
:
"
netuoso
"
,
"
score
"
:
2
0
"
score
"
:
5
0
},
},
{
{
"
url
"
:
"
https://rpc.steemliberator.com
"
,
"
url
"
:
"
https://rpc.steemliberator.com
"
,
"
version
"
:
"
0.19.
3
"
,
"
version
"
:
"
0.19.
5
"
,
"
type
"
:
"
normal
"
,
"
type
"
:
"
normal
"
,
"
owner
"
:
"
netuoso
"
,
"
owner
"
:
"
netuoso
"
,
"
score
"
:
1
0
"
score
"
:
2
0
},
},
{
{
"
url
"
:
"
wss://seed.bitcoiner.me
"
,
"
url
"
:
"
wss://seed.bitcoiner.me
"
,
"
version
"
:
"
0.19.3
"
,
"
version
"
:
"
0.19.3
"
,
"
type
"
:
"
normal
"
,
"
type
"
:
"
normal
"
,
"
owner
"
:
"
bitcoiner
"
,
"
owner
"
:
"
bitcoiner
"
,
"
score
"
:
1
"
score
"
:
-
10
},
},
{
{
"
url
"
:
"
https://seed.bitcoiner.me
"
,
"
url
"
:
"
https://seed.bitcoiner.me
"
,
"
version
"
:
"
0.19.3
"
,
"
version
"
:
"
0.19.3
"
,
"
type
"
:
"
normal
"
,
"
type
"
:
"
normal
"
,
"
owner
"
:
"
bitcoiner
"
,
"
owner
"
:
"
bitcoiner
"
,
"
score
"
:
1
"
score
"
:
-
10
},
},
{
{
"
url
"
:
"
wss://steemd.steemgigs.org
"
,
"
url
"
:
"
wss://steemd.steemgigs.org
"
,
...
@@ -185,18 +185,18 @@ class NodeList(list):
...
@@ -185,18 +185,18 @@ class NodeList(list):
"
version
"
:
"
0.19.3
"
,
"
version
"
:
"
0.19.3
"
,
"
type
"
:
"
normal
"
,
"
type
"
:
"
normal
"
,
"
owner
"
:
"
followbtcnews
"
,
"
owner
"
:
"
followbtcnews
"
,
"
score
"
:
1
2
0
"
score
"
:
10
},
},
{
{
"
url
"
:
"
https://steemd.minnowsupportproject.org
"
,
"
url
"
:
"
https://steemd.minnowsupportproject.org
"
,
"
version
"
:
"
0.19.3
"
,
"
version
"
:
"
0.19.3
"
,
"
type
"
:
"
normal
"
,
"
type
"
:
"
normal
"
,
"
owner
"
:
"
followbtcnews
"
,
"
owner
"
:
"
followbtcnews
"
,
"
score
"
:
9
0
"
score
"
:
1
0
},
},
{
{
"
url
"
:
"
https://rpc.curiesteem.com
"
,
"
url
"
:
"
https://rpc.curiesteem.com
"
,
"
version
"
:
"
0.19.
3
"
,
"
version
"
:
"
0.19.
5
"
,
"
type
"
:
"
normal
"
,
"
type
"
:
"
normal
"
,
"
owner
"
:
"
curie
"
,
"
owner
"
:
"
curie
"
,
"
score
"
:
50
"
score
"
:
50
...
@@ -308,9 +308,9 @@ class NodeList(list):
...
@@ -308,9 +308,9 @@ class NodeList(list):
def
get_nodes
(
self
,
normal
=
True
,
appbase
=
True
,
dev
=
False
,
testnet
=
False
,
wss
=
True
,
https
=
True
):
def
get_nodes
(
self
,
normal
=
True
,
appbase
=
True
,
dev
=
False
,
testnet
=
False
,
wss
=
True
,
https
=
True
):
"""
Returns nodes as list
"""
Returns nodes as list
:param bool normal: when True, nodes with version 0.19.
2 or 0.19.3
are included
:param bool normal: when True, nodes with version 0.19.
5
are included
:param bool appbase: when True, nodes with version 0.19.
4
are included
:param bool appbase: when True, nodes with version 0.19.
10
are included
:param bool dev: when True, dev nodes with version 0.19.
4
are included
:param bool dev: when True, dev nodes with version 0.19.
10
are included
:param bool testnet: when True, testnet nodes are included
:param bool testnet: when True, testnet nodes are included
"""
"""
...
...
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