MCPcopy Create free account
hub / github.com/LUX-Core/lux / setup_network

Method setup_network

test/functional/example_test.py:102–117  ·  view source on GitHub ↗

Setup the test network topology Often you won't need to override this, since the standard network topology (linear: node0 <-> node1 <-> node2 <-> ...) is fine for most tests. If you do override this method, remember to start the nodes, assign them to self.nodes, con

(self)

Source from the content-addressed store, hash-verified

100 # pass
101
102 def setup_network(self):
103 """Setup the test network topology
104
105 Often you won&#x27;t need to override this, since the standard network topology
106 (linear: node0 <-> node1 <-> node2 <-> ...) is fine for most tests.
107
108 If you do override this method, remember to start the nodes, assign
109 them to self.nodes, connect them and then sync."""
110
111 self.setup_nodes()
112
113 # In this test, we're not connecting node2 to node0 or node1. Calls to
114 # sync_all() should not include node2, since we're not expecting it to
115 # sync.
116 connect_nodes(self.nodes[0], 1)
117 self.sync_all([self.nodes[0:1]])
118
119 # Use setup_nodes() to customize the node start behaviour (for example if
120 # you don't want to start all nodes at the start of the test).

Callers

nothing calls this directly

Calls 3

connect_nodesFunction · 0.90
setup_nodesMethod · 0.45
sync_allMethod · 0.45

Tested by

no test coverage detected