Unverified Commit 41190243 authored by kladko's avatar kladko

SKALE-3274-restart-enclave

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