Fabcoin Core  0.16.2
P2P Digital Currency
Functions
io.c File Reference
#include "io.h"
#include <string.h>
#include <stdio.h>
#include <errno.h>
Include dependency graph for io.c:

Go to the source code of this file.

Functions

enum ethash_io_rc ethash_io_prepare (char const *dirname, ethash_h256_t const seedhash, FILE **output_file, uint64_t file_size, bool force_create)
 Prepares io for ethash. More...
 

Detailed Description

Author
Lefteris Karapetsas lefte.nosp@m.ris@.nosp@m.ethde.nosp@m.v.co.nosp@m.m
Date
2015

Definition in file io.c.

Function Documentation

enum ethash_io_rc ethash_io_prepare ( char const *  dirname,
ethash_h256_t const  seedhash,
FILE **  output_file,
uint64_t  file_size,
bool  force_create 
)

Prepares io for ethash.

Create the DAG directory and the DAG file if they don't exist.

Parameters
[in]dirnameA null terminated c-string of the path of the ethash data directory. If it does not exist it's created.
[in]seedhashThe seedhash of the current block number, used in the naming of the file as can be seen from the spec at: https://github.com/ethereum/wiki/wiki/Ethash-DAG
[out]output_fileIf there was no failure then this will point to an open file descriptor. User is responsible for closing it. In the case of memo match then the file is open on read mode, while on the case of mismatch a new file is created on write mode
[in]file_sizeThe size that the DAG file should have on disk
[out]force_createIf true then there is no check to see if the file already exists
Returns
For possible return values
See also
enum ethash_io_rc

Definition at line 26 of file io.c.

Here is the call graph for this function:

Here is the caller graph for this function: