diff --git a/sgxwall.cpp b/sgxwall.cpp index 5ebbd29e..50cc5421 100644 --- a/sgxwall.cpp +++ b/sgxwall.cpp @@ -180,7 +180,9 @@ int main(int argc, char *argv[]) { initAll(enclaveLogLevel, checkClientCertOption, autoSignClientCertOption); - if (generateTestKeys) { + ifstream is("sgx_data/4node.json"); + + if (generateTestKeys && !is.good()) { cerr << "Generating test keys ..." << endl; @@ -197,6 +199,7 @@ int main(int argc, char *argv[]) { SGXWallet::serializeKeys(ecdsaKeyNames, blsKeyNames, "sgx_data/4node.json"); + schainID = 2; dkgID = 2;