Merge pull request #3191

3607d467 core: add --no-fluffy-blocks, and enable fluffy blocks by default (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2018-02-17 11:48:31 +01:00
commit a2cbedd29f
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD

View file

@ -134,7 +134,12 @@ namespace cryptonote
}; };
static const command_line::arg_descriptor<bool> arg_fluffy_blocks = { static const command_line::arg_descriptor<bool> arg_fluffy_blocks = {
"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<bool> arg_no_fluffy_blocks = {
"no-fluffy-blocks"
, "Relay blocks as normal blocks"
, false , false
}; };
static const command_line::arg_descriptor<size_t> arg_max_txpool_size = { static const command_line::arg_descriptor<size_t> 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_block_sync_size);
command_line::add_arg(desc, arg_check_updates); command_line::add_arg(desc, arg_check_updates);
command_line::add_arg(desc, arg_fluffy_blocks); 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_test_dbg_lock_sleep);
command_line::add_arg(desc, arg_offline); command_line::add_arg(desc, arg_offline);
command_line::add_arg(desc, arg_disable_dns_checkpoints); 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)); 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)); 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_offline = get_arg(vm, arg_offline);
m_disable_dns_checkpoints = get_arg(vm, arg_disable_dns_checkpoints); 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) if (command_line::get_arg(vm, arg_test_drop_download) == true)
test_drop_download(); test_drop_download();