From 9b9fa13636c54dcd933e2ffd7842d565d95ec84f Mon Sep 17 00:00:00 2001 From: tux3 Date: Sat, 19 Dec 2015 04:42:55 +0100 Subject: [PATCH] Change column order when filling peer cache A minor detail, but worth it. --- src/persistence/history.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/persistence/history.cpp b/src/persistence/history.cpp index f61ee86ab..d314f7d95 100644 --- a/src/persistence/history.cpp +++ b/src/persistence/history.cpp @@ -195,9 +195,9 @@ void History::init() "CREATE TABLE IF NOT EXISTS faux_offline_pending (id INTEGER PRIMARY KEY);"); // Cache our current peers - db.execLater(RawDatabase::Query{"SELECT id, public_key FROM peers;", [this](const QVector& row) + db.execLater(RawDatabase::Query{"SELECT public_key, id FROM peers;", [this](const QVector& row) { - peers[row[1].toString()] = row[0].toInt(); + peers[row[0].toString()] = row[1].toInt(); }}); }