MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / setup_network

Method setup_network

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

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

Tested by

no test coverage detected