Save immediately on persistent state modification.

Modifications for #6.
This commit is contained in:
Michael Kuc
2019-08-29 16:20:42 +01:00
parent ad250d14e3
commit aeb9c89be8
9 changed files with 28 additions and 4 deletions

View File

@@ -80,7 +80,7 @@ void Storage::init(const string& dirPrefix) {
void Storage::save() {
ofstream file{ Storage::filename };
for (auto& keypair : Storage::appParams) {
for (const auto& keypair : Storage::appParams) {
const auto& keyID = keypair.first;
const auto& appParam = keypair.second;
const auto& privKey = Storage::privKeys[keyID];