def setup_2_masternodes_network(self):
    self.ownerOne = self.nodes[self.ownerOnePos]
    self.remoteOne = self.nodes[self.remoteOnePos]
    self.ownerTwo = self.nodes[self.ownerTwoPos]
    self.remoteTwo = self.nodes[self.remoteTwoPos]
    self.miner = self.nodes[self.minerPos]
    ownerOneDir = os.path.join(self.options.tmpdir, 'node0')
    ownerTwoDir = os.path.join(self.options.tmpdir, 'node2')
    self.log.info('generating 259 blocks..')
    for i in range(250):
        self.mocktime = self.generate_pow(self.minerPos, self.mocktime)
    self.sync_blocks()
    self.stake(9)
    self.log.info('masternodes setup..')
    self.mnOneTxHash = self.setupMasternode(self.ownerOne, self.miner, self.masternodeOneAlias, os.path.join(ownerOneDir, 'regtest'), self.remoteOnePos, self.mnOnePrivkey)
    self.mnTwoTxHash = self.setupMasternode(self.ownerTwo, self.miner, self.masternodeTwoAlias, os.path.join(ownerTwoDir, 'regtest'), self.remoteTwoPos, self.mnTwoPrivkey)
    self.log.info('masternodes setup completed, initializing them..')
    self.stake(1)
    time.sleep(3)
    self.advance_mocktime(10)
    remoteOnePort = p2p_port(self.remoteOnePos)
    remoteTwoPort = p2p_port(self.remoteTwoPos)
    self.remoteOne.initmasternode(self.mnOnePrivkey, ('127.0.0.1:' + str(remoteOnePort)))
    self.remoteTwo.initmasternode(self.mnTwoPrivkey, ('127.0.0.1:' + str(remoteTwoPort)))
    self.stake(1)
    self.wait_until_mnsync_finished()
    self.log.info('tier two synced! starting masternodes..')
    self.controller_start_all_masternodes()
def setup_2_masternodes_network(self):
    self.ownerOne = self.nodes[self.ownerOnePos]
    self.remoteOne = self.nodes[self.remoteOnePos]
    self.ownerTwo = self.nodes[self.ownerTwoPos]
    self.remoteTwo = self.nodes[self.remoteTwoPos]
    self.miner = self.nodes[self.minerPos]
    ownerOneDir = os.path.join(self.options.tmpdir, 'node0')
    ownerTwoDir = os.path.join(self.options.tmpdir, 'node2')
    self.log.info('generating 259 blocks..')
    for i in range(250):
        self.mocktime = self.generate_pow(self.minerPos, self.mocktime)
    self.sync_blocks()
    self.stake(9)
    self.log.info('masternodes setup..')
    self.mnOneTxHash = self.setupMasternode(self.ownerOne, self.miner, self.masternodeOneAlias, os.path.join(ownerOneDir, 'regtest'), self.remoteOnePos, self.mnOnePrivkey)
    self.mnTwoTxHash = self.setupMasternode(self.ownerTwo, self.miner, self.masternodeTwoAlias, os.path.join(ownerTwoDir, 'regtest'), self.remoteTwoPos, self.mnTwoPrivkey)
    self.log.info('masternodes setup completed, initializing them..')
    self.stake(1)
    time.sleep(3)
    self.advance_mocktime(10)
    remoteOnePort = p2p_port(self.remoteOnePos)
    remoteTwoPort = p2p_port(self.remoteTwoPos)
    self.remoteOne.initmasternode(self.mnOnePrivkey, ('127.0.0.1:' + str(remoteOnePort)))
    self.remoteTwo.initmasternode(self.mnTwoPrivkey, ('127.0.0.1:' + str(remoteTwoPort)))
    self.stake(1)
    self.wait_until_mnsync_finished()
    self.log.info('tier two synced! starting masternodes..')
    self.controller_start_all_masternodes()