aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-04-01 13:57:15 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-04-01 14:06:49 +0000
commiteda2661aa22402164fbcc4490f6ae09da3558bff (patch)
treea7419ca2d16269e405da9fda5ae9653a0c2c7046 /src
parentMerge pull request #5359 (diff)
downloadmonero-eda2661aa22402164fbcc4490f6ae09da3558bff.tar.xz
Allow pruning before v10
This check is now not needed anymore, and would prevent people from using --prune-blockchain when starting a new sync
Diffstat (limited to 'src')
-rw-r--r--src/blockchain_utilities/blockchain_prune.cpp18
-rw-r--r--src/cryptonote_core/blockchain.cpp6
-rw-r--r--src/daemon/rpc_command_executor.cpp2
3 files changed, 1 insertions, 25 deletions
diff --git a/src/blockchain_utilities/blockchain_prune.cpp b/src/blockchain_utilities/blockchain_prune.cpp
index 36080aade..8e13f2c04 100644
--- a/src/blockchain_utilities/blockchain_prune.cpp
+++ b/src/blockchain_utilities/blockchain_prune.cpp
@@ -611,24 +611,6 @@ int main(int argc, char* argv[])
}
already_pruned = true;
}
- if (n == 0)
- {
- const uint64_t blockchain_height = core_storage[0]->get_current_blockchain_height();
- const crypto::hash hash = core_storage[0]->get_block_id_by_height(blockchain_height - 1);
- cryptonote::block block;
- if (core_storage[0]->get_block_by_hash(hash, block))
- {
- if (block.major_version < 10)
- {
- time_t now = time(NULL);
- if (now < 1555286400) // 15 april 2019
- {
- MERROR("Pruning before v10 will confuse peers. Wait for v10 first");
- return 1;
- }
- }
- }
- }
}
core_storage[0]->deinit();
core_storage[0].reset(NULL);
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index f5bd9bbb5..e4a63c77a 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -3767,12 +3767,6 @@ leave:
//------------------------------------------------------------------
bool Blockchain::prune_blockchain(uint32_t pruning_seed)
{
- uint8_t hf_version = m_hardfork->get_current_version();
- if (hf_version < 10)
- {
- MERROR("Most of the network will only be ready for pruned blockchains from v10, not pruning");
- return false;
- }
return m_db->prune_blockchain(pruning_seed);
}
//------------------------------------------------------------------
diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp
index 4ee67f571..e81a82c51 100644
--- a/src/daemon/rpc_command_executor.cpp
+++ b/src/daemon/rpc_command_executor.cpp
@@ -2175,7 +2175,7 @@ bool t_rpc_command_executor::check_blockchain_pruning()
if (res.pruning_seed)
{
- tools::success_msg_writer() << "Blockchain pruning checked";
+ tools::success_msg_writer() << "Blockchain is pruned";
}
else
{