Fix race condition

This commit is contained in:
Aditya Kulkarni
2019-05-22 14:37:39 -07:00
parent 8a297ab02e
commit 0ac6e90c81

View File

@@ -780,10 +780,11 @@ void RPC::refreshMigration() {
this->migrationStatus.unmigrated = QString::fromStdString(reply["unmigrated_amount"]).toDouble();
this->migrationStatus.migrated = QString::fromStdString(reply["finalized_migrated_amount"]).toDouble();
this->migrationStatus.txids.empty();
QList<QString> ids;
for (auto& it : reply["migration_txids"].get<json::array_t>()) {
this->migrationStatus.txids.push_back(QString::fromStdString(it.get<json::string_t>()));
ids.push_back(QString::fromStdString(it.get<json::string_t>()));
}
this->migrationStatus.txids = ids;
});
}