def setup_network(self):
    self.extra_args = [[] for _ in range(self.num_nodes)]
    for (i, import_node) in enumerate(IMPORT_NODES, 2):
        if import_node.prune:
            self.extra_args[i] += ['-prune=1']
    self.add_nodes(self.num_nodes, extra_args=self.extra_args)
    self.start_nodes(extra_args=([[]] * self.num_nodes))
    for n in self.nodes:
        n.importprivkey(privkey=n.get_deterministic_priv_key().key, label='coinbase')
    self.stop_nodes()
    self.start_nodes()
    for i in range(1, self.num_nodes):
        connect_nodes(self.nodes[i], 0)
def setup_network(self):
    self.extra_args = [[] for _ in range(self.num_nodes)]
    for (i, import_node) in enumerate(IMPORT_NODES, 2):
        if import_node.prune:
            self.extra_args[i] += ['-prune=1']
    self.add_nodes(self.num_nodes, extra_args=self.extra_args)
    self.start_nodes(extra_args=([[]] * self.num_nodes))
    for n in self.nodes:
        n.importprivkey(privkey=n.get_deterministic_priv_key().key, label='coinbase')
    self.stop_nodes()
    self.start_nodes()
    for i in range(1, self.num_nodes):
        connect_nodes(self.nodes[i], 0)