bhive.nodelist module¶
-
class
bhive.nodelist.
NodeList
¶ Bases:
list
Returns a node list
from bhive.nodelist import NodeList n = NodeList() nodes_urls = n.get_nodes()
-
get_nodes
(exclude_limited=False, dev=False, testnet=False, testnetdev=False, wss=True, https=True, not_working=False, normal=True, appbase=True)¶ Returns nodes as list
- Parameters
exclude_limited (bool) – When True, limited nodes are excluded
dev (bool) – when True, dev nodes with version 0.19.11 are included
testnet (bool) – when True, testnet nodes are included
testnetdev (bool) – When True, testnet-dev nodes are included
not_working (bool) – When True, all nodes including not working ones will be returned
normal (bool) – deprecated
appbase (bool) – deprecated
-
get_testnet
(testnet=True, testnetdev=False)¶ Returns testnet nodes
-
update_nodes
(weights=None, hive_instance=None)¶ Reads metadata from fullnodeupdate and recalculates the nodes score
- Parameters
weight (list, dict) – can be used to weight the different benchmarks
from bhive.nodelist import NodeList nl = NodeList() weights = [0, 0.1, 0.2, 1] nl.update_nodes(weights) weights = {'block': 0.1, 'history': 0.1, 'apicall': 1, 'config': 1} nl.update_nodes(weights)
-