Merge pull request #5577

f950517a core: update pruning if using --prune-blockchain on a pruned blockchain (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2019-06-01 20:25:19 +02:00
commit 62d32e955a
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD

View File

@ -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();