diff options
author | Thomas Winget <tewinget@gmail.com> | 2015-04-30 00:23:00 -0400 |
---|---|---|
committer | Thomas Winget <tewinget@gmail.com> | 2015-04-30 00:23:00 -0400 |
commit | 1b2614ba8358f35264a639f30b1b5d5bd61f20aa (patch) | |
tree | 01d287692ae660679dbd7bde3b791551f4cd46e7 /src | |
parent | update lmdb64 (diff) | |
download | monero-1b2614ba8358f35264a639f30b1b5d5bd61f20aa.tar.xz |
When removing 'stuck' transactions, don't ignore the first tx in the pool
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptonote_core/tx_pool.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp index 03ced2c2e..3ecc1a7c2 100644 --- a/src/cryptonote_core/tx_pool.cpp +++ b/src/cryptonote_core/tx_pool.cpp @@ -488,12 +488,12 @@ namespace cryptonote } for (auto it = m_transactions.begin(); it != m_transactions.end(); ) { - auto it2 = it++; - if (it2->second.blob_size >= TRANSACTION_SIZE_LIMIT) { - LOG_PRINT_L1("Transaction " << get_transaction_hash(it2->second.tx) << " is too big (" << it2->second.blob_size << " bytes), removing it from pool"); - remove_transaction_keyimages(it2->second.tx); - m_transactions.erase(it2); + if (it->second.blob_size >= TRANSACTION_SIZE_LIMIT) { + LOG_PRINT_L1("Transaction " << get_transaction_hash(it->second.tx) << " is too big (" << it->second.blob_size << " bytes), removing it from pool"); + remove_transaction_keyimages(it->second.tx); + m_transactions.erase(it); } + it++; } // Ignore deserialization error |