Unverified Commit 41190243 authored by kladko's avatar kladko

SKALE-3274-restart-enclave

parent 12a6e612
......@@ -211,9 +211,10 @@ void gen_SEK() {
void reinitEnclave() {
WRITE_LOCK(initMutex);
initEnclave();
shared_ptr <string> encrypted_SEK_ptr = LevelDB::getLevelDb()->readString("SEK");
setSEK(encrypted_SEK_ptr);
// unfortunately process needs to be restarted to reinit enclave
// exiting with error code 3 (SGX_OUT_OF_MEMORY), so docker container can restart the
// wallet
exit(3);
}
void setSEK(shared_ptr <string> hex_encrypted_SEK) {
......
......@@ -2,6 +2,7 @@ version: '3'
services:
sgxwallet:
image: skalenetwork/sgxwallet:latest
restart: on-failure
ports:
- "1026:1026"
- "1027:1027"
......
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