QAction *scanTxAction = new QAction(tr("Import Transaction"), this);
m_statusLabelStatus->addAction(scanTxAction);
- m_updateNetworkInfoAction = new QAction(tr("Scan Now"), this);
+ m_updateNetworkInfoAction = new QAction(tr("Scan Mempool & Get Network Info"), this);
m_statusLabelStatus->addAction(m_updateNetworkInfoAction);
connect(m_actionPauseSync, &QAction::toggled, this, [this](bool checked) {
#include <thread>
#include <tuple>
+#include <QMetaObject>
+
#include "AddressBook.h"
#include "Coins.h"
#include "Subaddress.h"
bool shouldScanMempool = m_refreshNow || conf()->get(Config::scanMempoolWhenPaused).toBool();
if (shouldScanMempool) {
- qDebug() << "[SYNC PAUSED] Scanning mempool because scans are enabled";
- if (m_scheduler.stopping()) return;
- scanMempool();
+ if (m_wallet2->get_daemon_address().empty()) {
+ qDebug() << "[SYNC PAUSED] Skipping mempool scan because daemon address is empty";
+ } else {
+ qDebug() << "[SYNC PAUSED] Scanning mempool because scans are enabled";
+ if (m_scheduler.stopping()) return;
+ scanMempool();
+ }
}
// Update network stats if we just scanned OR if we don't have stats yet (startup recovery)
currentSubaddressAccount(), subaddr_indices, m_selectedInputs, subtractFeeFromAmount);
QVector<QString> addresses{address};
- this->onTransactionCreated(ptImpl, addresses);
+ QMetaObject::invokeMethod(this, [this, ptImpl, addresses] {
+ this->onTransactionCreated(ptImpl, addresses);
+ }, Qt::QueuedConnection);
});
}
static_cast<Monero::PendingTransaction::Priority>(feeLevel),
currentSubaddressAccount(), subaddr_indices, m_selectedInputs, subtractFeeFromAmount);
- this->onTransactionCreated(ptImpl, addresses);
+ QMetaObject::invokeMethod(this, [this, ptImpl, addresses] {
+ this->onTransactionCreated(ptImpl, addresses);
+ }, Qt::QueuedConnection);
});
}
static_cast<Monero::PendingTransaction::Priority>(feeLevel));
QVector<QString> addresses {address};
- this->onTransactionCreated(ptImpl, addresses);
+ QMetaObject::invokeMethod(this, [this, ptImpl, addresses] {
+ this->onTransactionCreated(ptImpl, addresses);
+ }, Qt::QueuedConnection);
});
}
void Wallet::onTransactionCreated(Monero::PendingTransaction *mtx, const QVector<QString> &address) {
qDebug() << Q_FUNC_INFO;
- startRefresh();
PendingTransaction *tx = new PendingTransaction(mtx, this);