diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-02-12 17:17:30 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-02-12 17:17:30 +0000 |
commit | 8bdc86beb4c17b6970f25f00d35fe45977681956 (patch) | |
tree | 5143eb76118b38631df645a8564d83e90063dfbe /src/cryptonote_protocol/cryptonote_protocol_handler.h | |
parent | epee: fix some log macros not printing context nicely (diff) | |
download | monero-8bdc86beb4c17b6970f25f00d35fe45977681956.tar.xz |
protocol: speed up sync by minimizing duplicate work
In particular, the prepare_handle_incoming_blocks call
is pretty lengthy, and entirely pointless in the common
case where several different connections will prepare
the exact same blocks.
Diffstat (limited to 'src/cryptonote_protocol/cryptonote_protocol_handler.h')
-rw-r--r-- | src/cryptonote_protocol/cryptonote_protocol_handler.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.h b/src/cryptonote_protocol/cryptonote_protocol_handler.h index 7a3a2d325..fd4f03690 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.h +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.h @@ -135,6 +135,7 @@ namespace cryptonote std::atomic<bool> m_synchronized; bool m_one_request = true; std::atomic<bool> m_stopping; + epee::critical_section m_sync_lock; boost::mutex m_buffer_mutex; double get_avg_block_size(); |