Skip to content
Snippets Groups Projects
Commit f54a5141 authored by Holger Nahrstaedt's avatar Holger Nahrstaedt
Browse files

Improve pingnode and prepare readme for release

parent 9e401fd7
No related branches found
No related tags found
No related merge requests found
...@@ -128,6 +128,15 @@ Documentation is available at http://beem.readthedocs.io/en/latest/ ...@@ -128,6 +128,15 @@ Documentation is available at http://beem.readthedocs.io/en/latest/
Changelog Changelog
========= =========
0.19.24
-------
* AsciiChart for beempy: pricehistory, tradehistory and orderbook
* Sort nodes regarding their ping times (beempy ping --sort --remove)
* currentnode and nextnode skip not working nodes
* Memory consumption fer requests and websocket reduced when creating more instances of steem
* trade_history added to market
* Issue #4 fixed
0.19.23 0.19.23
------- -------
* new function for beempy added: power, follower, following, muter, muting, mute, nextnode, pingnode, currentnode * new function for beempy added: power, follower, following, muter, muting, mute, nextnode, pingnode, currentnode
......
...@@ -247,15 +247,20 @@ def pingnode(raw, sort, remove): ...@@ -247,15 +247,20 @@ def pingnode(raw, sort, remove):
if sort: if sort:
ping_times = [] ping_times = []
for node in nodes: for node in nodes:
ping_times.append(1000.)
for i in range(len(nodes)):
try: try:
stm_local = Steem(node=node, num_retries=2, num_retries_call=3, timeout=5) stm_local = Steem(node=nodes[i], num_retries=2, num_retries_call=3, timeout=10)
start = timer() start = timer()
stm_local.get_config(use_stored_data=False) stm_local.get_config(use_stored_data=False)
stop = timer() stop = timer()
rpc_answer_time = stop - start rpc_answer_time = stop - start
ping_times.append(rpc_answer_time) ping_times[i] = rpc_answer_time
except KeyboardInterrupt:
break
except: except:
ping_times.append(float("inf")) ping_times[i] = float("inf")
print("node %s results in %.2f" % (nodes[i], ping_times[i]))
sorted_arg = sorted(range(len(ping_times)), key=ping_times.__getitem__) sorted_arg = sorted(range(len(ping_times)), key=ping_times.__getitem__)
sorted_nodes = [] sorted_nodes = []
for i in sorted_arg: for i in sorted_arg:
......
...@@ -40,7 +40,7 @@ if __name__ == "__main__": ...@@ -40,7 +40,7 @@ if __name__ == "__main__":
for node in nodes: for node in nodes:
print("Current node:", node) print("Current node:", node)
try: try:
stm = Steem(node=node, num_retries=2, num_retries_call=3, timeout=5) stm = Steem(node=node, num_retries=2, num_retries_call=3, timeout=10)
blockchain = Blockchain(steem_instance=stm) blockchain = Blockchain(steem_instance=stm)
account = Account("gtg", steem_instance=stm) account = Account("gtg", steem_instance=stm)
virtual_op_count = account.virtual_op_count() virtual_op_count = account.virtual_op_count()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment