From 3607d467f314997ae8d3c62c542faab9d1bde71f Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 27 Jan 2018 17:37:09 +0000 Subject: [PATCH] core: add --no-fluffy-blocks, and enable fluffy blocks by default --- src/cryptonote_core/cryptonote_core.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index aaa5ccdbc..786d21aa1 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -134,7 +134,12 @@ namespace cryptonote }; static const command_line::arg_descriptor arg_fluffy_blocks = { "fluffy-blocks" - , "Relay blocks as fluffy blocks where possible (automatic on testnet)" + , "Relay blocks as fluffy blocks (obsolete, now default)" + , true + }; + static const command_line::arg_descriptor arg_no_fluffy_blocks = { + "no-fluffy-blocks" + , "Relay blocks as normal blocks" , false }; static const command_line::arg_descriptor arg_max_txpool_size = { @@ -243,6 +248,7 @@ namespace cryptonote command_line::add_arg(desc, arg_block_sync_size); command_line::add_arg(desc, arg_check_updates); command_line::add_arg(desc, arg_fluffy_blocks); + command_line::add_arg(desc, arg_no_fluffy_blocks); command_line::add_arg(desc, arg_test_dbg_lock_sleep); command_line::add_arg(desc, arg_offline); command_line::add_arg(desc, arg_disable_dns_checkpoints); @@ -279,9 +285,11 @@ namespace cryptonote set_enforce_dns_checkpoints(command_line::get_arg(vm, arg_dns_checkpoints)); test_drop_download_height(command_line::get_arg(vm, arg_test_drop_download_height)); - m_fluffy_blocks_enabled = m_testnet || get_arg(vm, arg_fluffy_blocks); + m_fluffy_blocks_enabled = !get_arg(vm, arg_no_fluffy_blocks); m_offline = get_arg(vm, arg_offline); m_disable_dns_checkpoints = get_arg(vm, arg_disable_dns_checkpoints); + if (!command_line::is_arg_defaulted(vm, arg_fluffy_blocks)) + MWARNING(arg_fluffy_blocks.name << " is obsolete, it is now default"); if (command_line::get_arg(vm, arg_test_drop_download) == true) test_drop_download();