Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/node/interfaces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1477,9 +1477,16 @@ class ChainImpl : public Chain
void requestMempoolTransactions(Notifications& notifications) override
{
if (!m_node.mempool) return;
LOCK2(::cs_main, m_node.mempool->cs);
for (const CTxMemPoolEntry& entry : m_node.mempool->mapTx) {
notifications.transactionAddedToMempool(entry.GetSharedTx(), /*nAcceptTime=*/0);
std::vector<CTransactionRef> txs;
{
LOCK2(::cs_main, m_node.mempool->cs);
txs.reserve(m_node.mempool->mapTx.size());
for (const CTxMemPoolEntry& entry : m_node.mempool->mapTx) {
txs.emplace_back(entry.GetSharedTx());
}
}
for (const auto& tx : txs) {
notifications.transactionAddedToMempool(tx, /*nAcceptTime=*/0);
}
}
bool hasAssumedValidChain() override
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2011,7 +2011,7 @@ CWallet::ScanResult CWallet::ScanForWalletTransactions(const uint256& start_bloc
}
if (!max_height) {
WalletLogPrintf("Scanning current mempool transactions.\n");
WITH_LOCK(cs_wallet, chain().requestMempoolTransactions(*this));
chain().requestMempoolTransactions(*this);
}
ShowProgress(strprintf("%s " + _("Rescanning…").translated, GetDisplayName()), 100); // hide progress dialog in GUI
if (block_height && fAbortRescan) {
Expand Down
Loading