def generate_pow_cache():
    create_cachedir(powcachedir)
    self.log.info("Creating 'PoW-chain': 200 blocks")
    start_nodes_from_dir(powcachedir, 4)
    self.log.info('Mining 200 blocks')
    self.enable_mocktime()
    block_time = (self.mocktime - (331 * 60))
    for i in range(2):
        for peer in range(4):
            for j in range(25):
                set_node_times(self.nodes, block_time)
                self.nodes[peer].generate(1)
                block_time += 60
            self.sync_blocks()
    self.log.info('Stopping nodes')
    stop_and_clean_cache_dir(powcachedir)
    self.log.info('---> pow cache created')
    self.disable_mocktime()
def generate_pow_cache():
    create_cachedir(powcachedir)
    self.log.info("Creating 'PoW-chain': 200 blocks")
    start_nodes_from_dir(powcachedir, 4)
    self.log.info('Mining 200 blocks')
    self.enable_mocktime()
    block_time = (self.mocktime - (331 * 60))
    for i in range(2):
        for peer in range(4):
            for j in range(25):
                set_node_times(self.nodes, block_time)
                self.nodes[peer].generate(1)
                block_time += 60
            self.sync_blocks()
    self.log.info('Stopping nodes')
    stop_and_clean_cache_dir(powcachedir)
    self.log.info('---> pow cache created')
    self.disable_mocktime()