OlinCoin
Test
init_db.h
1#pragma once
2#include "leveldb/c.h"
3#define PROD_DB_LOC "/prod"
4#define TEST_DB_LOC "/test"
5#define CHAIN_HEIGHT_FILE "/chain_height.dat"
6#define TOP_BLOCK_HASH_FILE "/top_block_hash.dat"
7
14int create_folder(char *path);
15
22int create_proj_folders();
23
31int open_or_create_db(leveldb_t **db, char *path);
32
42int init_db(leveldb_t **db, char **dest, char *db_env, char *name);
43
51int destroy_db(leveldb_t **db, char *name);
52
60int db_count(leveldb_t *db, unsigned int *num_entries);