add more log output
This commit is contained in:
@@ -105,11 +105,14 @@ void ConnectionLoader::doAutoConnect()
|
|||||||
// If success, set the connection
|
// If success, set the connection
|
||||||
main->logger->write("Connection is online.");
|
main->logger->write("Connection is online.");
|
||||||
connection->setInfo(reply);
|
connection->setInfo(reply);
|
||||||
|
main->logger->write("getting Connection reply");
|
||||||
isSyncing = new QAtomicInteger<bool>();
|
isSyncing = new QAtomicInteger<bool>();
|
||||||
isSyncing->storeRelaxed(true);
|
isSyncing->storeRelaxed(true);
|
||||||
|
main->logger->write("isSyncing");
|
||||||
|
|
||||||
// Do a sync at startup
|
// Do a sync at startup
|
||||||
syncTimer = new QTimer(main);
|
syncTimer = new QTimer(main);
|
||||||
|
main->logger->write("Beginning sync");
|
||||||
connection->doRPCWithDefaultErrorHandling("sync", "", [=](QJsonValue) {
|
connection->doRPCWithDefaultErrorHandling("sync", "", [=](QJsonValue) {
|
||||||
isSyncing->storeRelaxed(false);
|
isSyncing->storeRelaxed(false);
|
||||||
// Cancel the timer
|
// Cancel the timer
|
||||||
@@ -124,10 +127,13 @@ void ConnectionLoader::doAutoConnect()
|
|||||||
if (isSyncing != nullptr && isSyncing->loadRelaxed()) {
|
if (isSyncing != nullptr && isSyncing->loadRelaxed()) {
|
||||||
// Get the sync status
|
// Get the sync status
|
||||||
connection->doRPC("syncstatus", "", [=](QJsonValue reply) {
|
connection->doRPC("syncstatus", "", [=](QJsonValue reply) {
|
||||||
|
|
||||||
if (isSyncing != nullptr && !reply.toObject()["synced_blocks"].isUndefined())
|
if (isSyncing != nullptr && !reply.toObject()["synced_blocks"].isUndefined())
|
||||||
{
|
{
|
||||||
qint64 synced = reply["synced_blocks"].toInt();
|
qint64 synced = reply["synced_blocks"].toInt();
|
||||||
|
main->logger->write("synced_blocks" + synced) ;
|
||||||
qint64 total = reply["total_blocks"].toInt();
|
qint64 total = reply["total_blocks"].toInt();
|
||||||
|
main->logger->write("total_blocks" + total) ;
|
||||||
me->showInformation(
|
me->showInformation(
|
||||||
"Synced " + QString::number(synced) + " / " + QString::number(total)
|
"Synced " + QString::number(synced) + " / " + QString::number(total)
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user