diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-09-14 18:25:15 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-09-14 18:25:15 +0200 |
commit | 4c07297dc6321c023d70c02c3c1a1a929c77aef8 (patch) | |
tree | 931d336829328cf6d984504bcb057ad5bd07097e /src/cryptonote_core | |
parent | Merge pull request #2389 (diff) | |
parent | Add a --fluffy-blocks option to relay blocks as fluffy blocks (diff) | |
download | monero-4c07297dc6321c023d70c02c3c1a1a929c77aef8.tar.xz |
Merge pull request #2392
6ac61100 Add a --fluffy-blocks option to relay blocks as fluffy blocks (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 2 | ||||
-rw-r--r-- | src/cryptonote_core/cryptonote_core.h | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 73ce88c79..f9f098ead 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -161,6 +161,7 @@ namespace cryptonote command_line::add_arg(desc, command_line::arg_show_time_stats); command_line::add_arg(desc, command_line::arg_block_sync_size); command_line::add_arg(desc, command_line::arg_check_updates); + command_line::add_arg(desc, command_line::arg_fluffy_blocks); // we now also need some of net_node's options (p2p bind arg, for separate data dir) command_line::add_arg(desc, nodetool::arg_testnet_p2p_bind_port, false); @@ -197,6 +198,7 @@ namespace cryptonote set_enforce_dns_checkpoints(command_line::get_arg(vm, command_line::arg_dns_checkpoints)); test_drop_download_height(command_line::get_arg(vm, command_line::arg_test_drop_download_height)); + m_fluffy_blocks_enabled = m_testnet || get_arg(vm, command_line::arg_fluffy_blocks); if (command_line::get_arg(vm, command_line::arg_test_drop_download) == true) test_drop_download(); diff --git a/src/cryptonote_core/cryptonote_core.h b/src/cryptonote_core/cryptonote_core.h index f565afd87..8e17569a9 100644 --- a/src/cryptonote_core/cryptonote_core.h +++ b/src/cryptonote_core/cryptonote_core.h @@ -728,6 +728,13 @@ namespace cryptonote */ bool get_testnet() const { return m_testnet; }; + /** + * @brief get whether fluffy blocks are enabled + * + * @return whether fluffy blocks are enabled + */ + bool fluffy_blocks_enabled() const { return m_fluffy_blocks_enabled; } + private: /** @@ -945,6 +952,8 @@ namespace cryptonote tools::download_async_handle m_update_download; size_t m_last_update_length; boost::mutex m_update_mutex; + + bool m_fluffy_blocks_enabled; }; } |