aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_protocol/cryptonote_protocol_handler.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-02-12 17:17:30 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-02-12 17:17:30 +0000
commit8bdc86beb4c17b6970f25f00d35fe45977681956 (patch)
tree5143eb76118b38631df645a8564d83e90063dfbe /src/cryptonote_protocol/cryptonote_protocol_handler.h
parentepee: fix some log macros not printing context nicely (diff)
downloadmonero-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.h1
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();