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

Remove steemitstage and improve coverage for steemnoderpc

parent cc889565
No related branches found
No related tags found
No related merge requests found
...@@ -72,23 +72,18 @@ class SteemNodeRPC(GrapheneRPC): ...@@ -72,23 +72,18 @@ class SteemNodeRPC(GrapheneRPC):
raise e raise e
def get_account(self, name, **kwargs): def get_account(self, name, **kwargs):
""" Get full account details from account name or id """ Get full account details from account name
:param str name: Account name or account id :param str name: Account name
""" """
if isinstance(name, str): if isinstance(name, str):
return self.get_accounts([name], **kwargs) return self.get_accounts([name], **kwargs)
elif isinstance(name, int):
return self.get_account_references(name, **kwargs)
def get_network(self): def get_network(self):
""" Identify the connected network. This call returns a """ Identify the connected network. This call returns a
dictionary with keys chain_id, core_symbol and prefix dictionary with keys chain_id, core_symbol and prefix
""" """
try: props = self.get_config(api="database")
props = self.get_config(api="database")
except:
props = self.get_config()
if "STEEMIT_CHAIN_ID" in props: if "STEEMIT_CHAIN_ID" in props:
chain_id = props["STEEMIT_CHAIN_ID"] chain_id = props["STEEMIT_CHAIN_ID"]
network_version = props['STEEMIT_BLOCKCHAIN_VERSION'] network_version = props['STEEMIT_BLOCKCHAIN_VERSION']
......
...@@ -70,9 +70,6 @@ class GrapheneRPC(object): ...@@ -70,9 +70,6 @@ class GrapheneRPC(object):
ws = GrapheneRPC("https://api.steemit.com","","") ws = GrapheneRPC("https://api.steemit.com","","")
print(ws.get_account_count()) print(ws.get_account_count())
ws = GrapheneRPC("https://api.steemitstage.com","","")
print(ws.get_account_count())
.. note:: This class allows to call methods available via .. note:: This class allows to call methods available via
websocket. If you want to use the notification websocket. If you want to use the notification
subsystem, please use ``GrapheneWebsocket`` instead. subsystem, please use ``GrapheneWebsocket`` instead.
......
...@@ -17,24 +17,19 @@ logging.basicConfig(level=logging.INFO) ...@@ -17,24 +17,19 @@ logging.basicConfig(level=logging.INFO)
if __name__ == "__main__": if __name__ == "__main__":
node_setup = 3 node_setup = 2
how_many_hours = 1 how_many_hours = 1
if node_setup == 0: if node_setup == 0:
stm = Steem(node="https://api.steemit.com", num_retries=10) stm = Steem(node="https://api.steemit.com", num_retries=10)
max_batch_size = None max_batch_size = None
threading = True
thread_num = 8
elif node_setup == 1:
stm = Steem(node="https://api.steemitstage.com", num_retries=10)
max_batch_size = None
threading = False threading = False
thread_num = 8 thread_num = 8
elif node_setup == 2: elif node_setup == 1:
stm = Steem(node="https://api.steemitstage.com", num_retries=10) stm = Steem(node="https://api.steemit.com", num_retries=10)
max_batch_size = None max_batch_size = None
threading = True threading = True
thread_num = 8 thread_num = 8
elif node_setup == 3: elif node_setup == 2:
stm = Steem(num_retries=10) stm = Steem(num_retries=10)
max_batch_size = None max_batch_size = None
threading = True threading = True
......
...@@ -18,7 +18,7 @@ logging.basicConfig(level=logging.INFO) ...@@ -18,7 +18,7 @@ logging.basicConfig(level=logging.INFO)
nodes = ["wss://steemd.pevo.science", "wss://gtg.steem.house:8090", "wss://rpc.steemliberator.com", "wss://rpc.buildteam.io", nodes = ["wss://steemd.pevo.science", "wss://gtg.steem.house:8090", "wss://rpc.steemliberator.com", "wss://rpc.buildteam.io",
"wss://rpc.steemviz.com", "wss://seed.bitcoiner.me", "wss://node.steem.ws", "wss://steemd.steemgigs.org", "wss://rpc.steemviz.com", "wss://seed.bitcoiner.me", "wss://node.steem.ws", "wss://steemd.steemgigs.org",
"wss://steemd.minnowsupportproject.org", "https://api.steemitstage.com", "https://api.steemit.com", "https://rpc.buildteam.io", "wss://steemd.minnowsupportproject.org", "https://api.steemit.com", "https://rpc.buildteam.io",
"https://steemd.minnowsupportproject.org", "https://steemd.pevo.science", "https://rpc.steemviz.com", "https://seed.bitcoiner.me", "https://steemd.minnowsupportproject.org", "https://steemd.pevo.science", "https://rpc.steemviz.com", "https://seed.bitcoiner.me",
"https://rpc.steemliberator.com", "https://steemd.privex.io", "https://gtg.steem.house:8090", "https://api.steem.house", "https://rpc.steemliberator.com", "https://steemd.privex.io", "https://gtg.steem.house:8090", "https://api.steem.house",
"https://rpc.curiesteem.com", "https://seed.bitcoiner.me"] "https://rpc.curiesteem.com", "https://seed.bitcoiner.me"]
......
...@@ -15,7 +15,7 @@ logging.basicConfig(level=logging.INFO) ...@@ -15,7 +15,7 @@ logging.basicConfig(level=logging.INFO)
if __name__ == "__main__": if __name__ == "__main__":
stm = Steem(node="https://api.steemitstage.com") stm = Steem(node="https://api.steemit.com")
# stm = Steem(node="wss://appbasetest.timcliff.com") # stm = Steem(node="wss://appbasetest.timcliff.com")
all_calls = stm.rpc.get_methods(api="jsonrpc") all_calls = stm.rpc.get_methods(api="jsonrpc")
t = PrettyTable(["method", "args", "ret"]) t = PrettyTable(["method", "args", "ret"])
......
...@@ -22,7 +22,7 @@ core_unit = "STM" ...@@ -22,7 +22,7 @@ core_unit = "STM"
nodes = ["wss://steemd.pevo.science", "wss://gtg.steem.house:8090", "wss://rpc.steemliberator.com", "wss://rpc.buildteam.io", nodes = ["wss://steemd.pevo.science", "wss://gtg.steem.house:8090", "wss://rpc.steemliberator.com", "wss://rpc.buildteam.io",
"wss://rpc.steemviz.com", "wss://seed.bitcoiner.me", "wss://node.steem.ws", "wss://steemd.steemgigs.org", "wss://steemd.steemit.com", "wss://rpc.steemviz.com", "wss://seed.bitcoiner.me", "wss://node.steem.ws", "wss://steemd.steemgigs.org", "wss://steemd.steemit.com",
"wss://steemd.minnowsupportproject.org"] "wss://steemd.minnowsupportproject.org"]
nodes_appbase = ["https://api.steemit.com", "https://api.steemitstage.com", "wss://appbasetest.timcliff.com"] nodes_appbase = ["https://api.steem.house", "https://api.steemit.com", "wss://appbasetest.timcliff.com"]
class TestBot: class TestBot:
......
...@@ -28,7 +28,7 @@ nodes_https = ['https://api.steemit.com', 'https://steemd.privex.io', 'https://s ...@@ -28,7 +28,7 @@ nodes_https = ['https://api.steemit.com', 'https://steemd.privex.io', 'https://s
'https://rpc.buildteam.io', 'https://steemd.minnowsupportproject.org', 'https://gtg.steem.house:8090', 'https://seed.bitcoiner.me'] 'https://rpc.buildteam.io', 'https://steemd.minnowsupportproject.org', 'https://gtg.steem.house:8090', 'https://seed.bitcoiner.me']
nodes_appbase = ["https://api.steemit.com", "wss://appbasetest.timcliff.com"] nodes_appbase = ["https://api.steemit.com", "wss://appbasetest.timcliff.com"]
test_list = ["wss://steemd.doesnot.exists", "wss://api.steemit.com", "wss://steemd.pevo.science", "wss://gtg.steem.house:8090", test_list = ["wss://steemd.doesnot.exists", "wss://api.steemit.com", "wss://steemd.pevo.science", "wss://gtg.steem.house:8090",
"https://api.steemit.com", "https://api.steemitstage.com", "wss://appbasetest.timcliff.com", 'https://steemd.privex.io', "https://api.steemit.com", "wss://appbasetest.timcliff.com", 'https://steemd.privex.io',
'https://steemd.pevo.science', 'https://rpc.steemliberator.com', 'https://steemd.pevo.science', 'https://rpc.steemliberator.com',
'https://rpc.buildteam.io', 'https://steemd.minnowsupportproject.org', 'https://gtg.steem.house:8090', 'https://seed.bitcoiner.me'] 'https://rpc.buildteam.io', 'https://steemd.minnowsupportproject.org', 'https://gtg.steem.house:8090', 'https://seed.bitcoiner.me']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment