diff --git a/src/turnstile.cpp b/src/turnstile.cpp index e1f1cfd..df58b15 100644 --- a/src/turnstile.cpp +++ b/src/turnstile.cpp @@ -320,8 +320,10 @@ void Turnstile::executeMigrationStep() { return; } + // Sometimes, we check too quickly, and the unspent UTXO is not updated yet, so we'll + // double check to see if there is enough balance. if (!rpc->getAllBalances()->keys().contains(nextStep->intTAddr)) { - qDebug() << QString("The intermediate t-address doesn't have balance, even though it is confirmed"); + //qDebug() << QString("The intermediate t-address doesn't have balance, even though it seems to be confirmed"); return; } @@ -350,12 +352,13 @@ void Turnstile::executeMigrationStep() { } } -void Turnstile::doSendTx(Tx tx, std::function /*cb*/) { +void Turnstile::doSendTx(Tx tx, std::function cb) { rpc->executeTransaction(tx, [=] (QString opid) { mainwindow->ui->statusBar->showMessage(QObject::tr("Computing Tx: ") % opid); }, [=] (QString /*opid*/, QString txid) { mainwindow->ui->statusBar->showMessage(Settings::txidStatusMessage + " " + txid); + cb(); }, [=] (QString opid, QString errStr) { mainwindow->ui->statusBar->showMessage(QObject::tr(" Tx ") % opid % QObject::tr(" failed"), 15 * 1000);