diff options
| author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-05-28 09:09:30 +0000 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-05-28 09:12:11 +0000 |
| commit | f950517a087da587b9dcb30f67c074c91fe1498c (patch) | |
| tree | 713c4ea1adcaffe2c2794c9bda47dbcde6bcdb83 | |
| parent | 5fbfa8a65663e807c6500ae9485e898df9b7c470 (diff) | |
| download | monzero-core-f950517a087da587b9dcb30f67c074c91fe1498c.tar.gz monzero-core-f950517a087da587b9dcb30f67c074c91fe1498c.tar.xz monzero-core-f950517a087da587b9dcb30f67c074c91fe1498c.zip | |
core: update pruning if using --prune-blockchain on a pruned blockchain
Avoids a massive amount of spurious warnings if the last update before
the daemon exited was a while ago and the daemon was syncing
| -rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index be1ea5a17..55e1b287f 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -675,8 +675,14 @@ namespace cryptonote { // display a message if the blockchain is not pruned yet if (m_blockchain_storage.get_current_blockchain_height() > 1 && !m_blockchain_storage.get_blockchain_pruning_seed()) + { MGINFO("Pruning blockchain..."); - CHECK_AND_ASSERT_MES(m_blockchain_storage.prune_blockchain(), false, "Failed to prune blockchain"); + CHECK_AND_ASSERT_MES(m_blockchain_storage.prune_blockchain(), false, "Failed to prune blockchain"); + } + else + { + CHECK_AND_ASSERT_MES(m_blockchain_storage.update_blockchain_pruning(), false, "Failed to update blockchain pruning"); + } } return load_state_data(); |
