MCPcopy Create free account
hub / github.com/ElementsProject/elements / setup_network

Method setup_network

test/functional/example_test.py:106–121  ·  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

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

Callers

nothing calls this directly

Calls 3

connect_nodesMethod · 0.80
setup_nodesMethod · 0.45
sync_allMethod · 0.45

Tested by

no test coverage detected