aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/tx_pool.cpp
diff options
context:
space:
mode:
authorZachary Michaels <mikezackles@gmail.com>2014-07-17 11:04:13 -0400
committerZachary Michaels <mikezackles@gmail.com>2014-07-17 16:53:48 -0400
commit8e99cee062c1398ba9d734d0e603a6dbd78a815a (patch)
treecf421877425ae4c2cfa28b7421f964ecad001317 /src/cryptonote_core/tx_pool.cpp
parentAdd transaction size limit (diff)
downloadmonero-8e99cee062c1398ba9d734d0e603a6dbd78a815a.tar.xz
Start fresh if tx_pool deserialize fails
Diffstat (limited to 'src/cryptonote_core/tx_pool.cpp')
-rw-r--r--src/cryptonote_core/tx_pool.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp
index 5927c9587..dc71bd918 100644
--- a/src/cryptonote_core/tx_pool.cpp
+++ b/src/cryptonote_core/tx_pool.cpp
@@ -468,7 +468,10 @@ namespace cryptonote
bool res = tools::unserialize_obj_from_file(*this, state_file_path);
if(!res)
{
- LOG_PRINT_L0("Failed to load memory pool from file " << state_file_path);
+ LOG_ERROR("Failed to load memory pool from file " << state_file_path);
+
+ m_transactions.clear();
+ m_spent_key_images.clear();
}
for (auto it = m_transactions.begin(); it != m_transactions.end(); ) {
@@ -480,7 +483,8 @@ namespace cryptonote
}
}
- return res;
+ // Ignore deserialization error
+ return true;
}
//---------------------------------------------------------------------------------