From 47dd9b5c2cb38cec7bcfbdbdc94f9665f2adc149 Mon Sep 17 00:00:00 2001 From: arkpar Date: Mon, 17 Aug 2015 18:15:58 +0200 Subject: [PATCH] Notifiy of new current transactions in makeCurrent --- libethereum/TransactionQueue.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libethereum/TransactionQueue.cpp b/libethereum/TransactionQueue.cpp index bf8e14a27..74a49d841 100644 --- a/libethereum/TransactionQueue.cpp +++ b/libethereum/TransactionQueue.cpp @@ -294,6 +294,7 @@ void TransactionQueue::setFuture(h256 const& _txHash) void TransactionQueue::makeCurrent_WITH_LOCK(Transaction const& _t) { + bool newCurrent = false; auto fs = m_future.find(_t.from()); if (fs != m_future.end()) { @@ -311,6 +312,7 @@ void TransactionQueue::makeCurrent_WITH_LOCK(Transaction const& _t) --m_futureSize; ++ft; ++nonce; + newCurrent = true; } fs->second.erase(fb, ft); if (fs->second.empty()) @@ -328,6 +330,9 @@ void TransactionQueue::makeCurrent_WITH_LOCK(Transaction const& _t) if (m_future.begin()->second.empty()) m_future.erase(m_future.begin()); } + + if (newCurrent) + m_onReady(); } void TransactionQueue::drop(h256 const& _txHash)