aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-10-31 14:43:13 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-10-31 14:45:02 +0000
commitcf552c752d3ddc2a7c7fcc4bfab756b794a16865 (patch)
treeff30c603c90ba76ca6b6fe8e01a11da22f15a18f /src
parentMerge pull request #4721 (diff)
downloadmonero-cf552c752d3ddc2a7c7fcc4bfab756b794a16865.tar.xz
tx_pool: allow take_tx to work without m_txs_by_fee_and_receive_time
This should make it possible to have two daemons running on the same database again.
Diffstat (limited to 'src')
-rw-r--r--src/cryptonote_core/tx_pool.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp
index 553a22298..86ce83346 100644
--- a/src/cryptonote_core/tx_pool.cpp
+++ b/src/cryptonote_core/tx_pool.cpp
@@ -454,8 +454,6 @@ namespace cryptonote
CRITICAL_REGION_LOCAL1(m_blockchain);
auto sorted_it = find_tx_in_sorted_container(id);
- if (sorted_it == m_txs_by_fee_and_receive_time.end())
- return false;
try
{
@@ -489,7 +487,8 @@ namespace cryptonote
return false;
}
- m_txs_by_fee_and_receive_time.erase(sorted_it);
+ if (sorted_it != m_txs_by_fee_and_receive_time.end())
+ m_txs_by_fee_and_receive_time.erase(sorted_it);
++m_cookie;
return true;
}