mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #5378
eda2661a
Allow pruning before v10 (moneromooo-monero)
This commit is contained in:
commit
bd429033df
3 changed files with 1 additions and 25 deletions
|
@ -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);
|
||||
|
|
|
@ -3819,12 +3819,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);
|
||||
}
|
||||
//------------------------------------------------------------------
|
||||
|
|
|
@ -2236,7 +2236,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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue