Example #1
0
 def sc_setup_chain(self):
     mc_node_1 = self.nodes[0]
     sc_node_1_configuration = SCNodeConfiguration(
         MCConnectionInfo(address="ws://{0}:{1}".format(mc_node_1.hostname, websocket_port_by_mc_node_index(0)))
     )
     network = SCNetworkConfiguration(SCCreationInfo(mc_node_1, 600, 1000), sc_node_1_configuration)
     self.sc_nodes_bootstrap_info = bootstrap_sidechain_nodes(self.options.tmpdir, network)
    def sc_setup_chain(self):
        # Bootstrap new SC, specify SC node 1 connection to MC node 1
        mc_node_1 = self.nodes[0]
        sc_node_1_configuration = SCNodeConfiguration(
            MCConnectionInfo(address="ws://{0}:{1}".format(mc_node_1.hostname, websocket_port_by_mc_node_index(0)))
        )
        sc_node_2_configuration = SCNodeConfiguration(MCConnectionInfo(), False)

        network = SCNetworkConfiguration(SCCreationInfo(mc_node_1, 600, 1000),
                                         sc_node_1_configuration, sc_node_2_configuration)
        bootstrap_sidechain_nodes(self.options.tmpdir, network)
    def sc_setup_chain(self):
        # Bootstrap new SC, specify SC nodes connection to MC node
        mc_node_1 = self.nodes[0]
        sc_node_1_configuration = SCNodeConfiguration(
            MCConnectionInfo(address="ws://{0}:{1}".format(
                mc_node_1.hostname, websocket_port_by_mc_node_index(0))))
        sc_node_2_configuration = SCNodeConfiguration(
            MCConnectionInfo(address="ws://{0}:{1}".format(
                mc_node_1.hostname, websocket_port_by_mc_node_index(0))))

        network = SCNetworkConfiguration(SCCreationInfo(mc_node_1, 100, 1000),
                                         sc_node_1_configuration,
                                         sc_node_2_configuration)
        # rewind sc genesis block timestamp for 5 consensus epochs
        self.sc_nodes_bootstrap_info = bootstrap_sidechain_nodes(
            self.options.tmpdir, network, 720 * 120 * 5)