aboutsummaryrefslogtreecommitdiff
path: root/src/p2p
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/p2p
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/p2p')
-rw-r--r--src/p2p/net_node.cpp1
-rw-r--r--src/p2p/net_node.h1
-rw-r--r--src/p2p/net_node.inl4
3 files changed, 6 insertions, 0 deletions
diff --git a/src/p2p/net_node.cpp b/src/p2p/net_node.cpp
index e0f1de14a..fcbcce58c 100644
--- a/src/p2p/net_node.cpp
+++ b/src/p2p/net_node.cpp
@@ -132,6 +132,7 @@ namespace nodetool
const command_line::arg_descriptor<std::vector<std::string> > arg_proxy = {"proxy", "<network-type>,<socks-ip:port>[,max_connections] i.e. \"tor,127.0.0.1:9050,100\""};
const command_line::arg_descriptor<std::vector<std::string> > arg_anonymous_inbound = {"anonymous-inbound", "<hidden-service-address>,<[bind-ip:]port>[,max_connections] i.e. \"x.onion,127.0.0.1:18083,100\""};
const command_line::arg_descriptor<bool> arg_p2p_hide_my_port = {"hide-my-port", "Do not announce yourself as peerlist candidate", false, true};
+ const command_line::arg_descriptor<bool> arg_no_sync = {"no-sync", "Don't synchronize the blockchain with other peers", false};
const command_line::arg_descriptor<bool> arg_no_igd = {"no-igd", "Disable UPnP port mapping"};
const command_line::arg_descriptor<int64_t> arg_out_peers = {"out-peers", "set max number of out peers", -1};
diff --git a/src/p2p/net_node.h b/src/p2p/net_node.h
index 7840e3832..42bb3b061 100644
--- a/src/p2p/net_node.h
+++ b/src/p2p/net_node.h
@@ -489,6 +489,7 @@ namespace nodetool
extern const command_line::arg_descriptor<std::vector<std::string> > arg_proxy;
extern const command_line::arg_descriptor<std::vector<std::string> > arg_anonymous_inbound;
extern const command_line::arg_descriptor<bool> arg_p2p_hide_my_port;
+ extern const command_line::arg_descriptor<bool> arg_no_sync;
extern const command_line::arg_descriptor<bool> arg_no_igd;
extern const command_line::arg_descriptor<bool> arg_offline;
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index 3542357dc..ba6e79d3f 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -103,6 +103,7 @@ namespace nodetool
command_line::add_arg(desc, arg_proxy);
command_line::add_arg(desc, arg_anonymous_inbound);
command_line::add_arg(desc, arg_p2p_hide_my_port);
+ command_line::add_arg(desc, arg_no_sync);
command_line::add_arg(desc, arg_no_igd);
command_line::add_arg(desc, arg_out_peers);
command_line::add_arg(desc, arg_in_peers);
@@ -310,6 +311,9 @@ namespace nodetool
if(command_line::has_arg(vm, arg_p2p_hide_my_port))
m_hide_my_port = true;
+ if (command_line::has_arg(vm, arg_no_sync))
+ m_payload_handler.set_no_sync(true);
+
if ( !set_max_out_peers(public_zone, command_line::get_arg(vm, arg_out_peers) ) )
return false;
else