Added walletdb name

parent 193dcbf4
......@@ -40,7 +40,7 @@ void init_daemon() {
libff::init_alt_bn128_params();
static std::string dbName("./sgxwalletdb");
static std::string dbName("./" WALLETDB_NAME);
levelDb = new LevelDB(dbName);
......
......@@ -37,6 +37,8 @@
#define KEY_SHARE_DOES_NOT_EXIST -7
#define KEY_SHARE_ALREADY_EXISTS -8
#define WALLETDB_NAME "sgxwallet.db"
......
......@@ -120,6 +120,10 @@ char *decryptKeyFromHex(int *errStatus, char *errMsg, const char *_encryptedKey)
#define TEST_KEY "4160780231445160889237664391382223604184857153814275770598791864649971919844"
void reset_db() {
REQUIRE(system("rm -rf " WALLETDB_NAME) == 0);
}
char* encryptTestKey() {
const char *key = TEST_KEY;
......@@ -214,6 +218,18 @@ TEST_CASE("BLS sign test", "[bls-sign]") {
}
TEST_CASE("KeysDB test", "[dkg-gen]") {
reset_db();
init_all();
// put your test here
}
TEST_CASE("DKG gen test", "[dkg-gen]") {
init_all();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment