aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_protocol/cryptonote_protocol_handler.h
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-03-19 10:57:28 +0200
committerRiccardo Spagni <ric@spagni.net>2019-03-19 10:57:28 +0200
commitbf0f85221b748d2825fb6b169c8914ff17f40db7 (patch)
tree673fdd37ec752ae0f812f0678a631b4ecd77e4e6 /src/cryptonote_protocol/cryptonote_protocol_handler.h
parentMerge pull request #4889 (diff)
parentdaemon: add '--no-sync' arg to optionally disable blockchain sync (diff)
downloadmonero-bf0f85221b748d2825fb6b169c8914ff17f40db7.tar.xz
Merge pull request #5195
a54e81e5 daemon: add '--no-sync' arg to optionally disable blockchain sync (xiphon)
Diffstat (limited to 'src/cryptonote_protocol/cryptonote_protocol_handler.h')
-rw-r--r--src/cryptonote_protocol/cryptonote_protocol_handler.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.h b/src/cryptonote_protocol/cryptonote_protocol_handler.h
index fc7db629c..a9ba9c3b9 100644
--- a/src/cryptonote_protocol/cryptonote_protocol_handler.h
+++ b/src/cryptonote_protocol/cryptonote_protocol_handler.h
@@ -111,6 +111,7 @@ namespace cryptonote
void stop();
void on_connection_close(cryptonote_connection_context &context);
void set_max_out_peers(unsigned int max) { m_max_out_peers = max; }
+ void set_no_sync(bool value) { m_no_sync = value; }
std::string get_peers_overview() const;
std::pair<uint32_t, uint32_t> get_next_needed_pruning_stripe() const;
bool needs_new_sync_connections() const;
@@ -149,6 +150,7 @@ namespace cryptonote
std::atomic<uint32_t> m_syncronized_connections_count;
std::atomic<bool> m_synchronized;
std::atomic<bool> m_stopping;
+ std::atomic<bool> m_no_sync;
boost::mutex m_sync_lock;
block_queue m_block_queue;
epee::math_helper::once_a_time_seconds<30> m_idle_peer_kicker;