aboutsummaryrefslogtreecommitdiff
path: root/node/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'node/main.cpp')
-rw-r--r--node/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/node/main.cpp b/node/main.cpp
index 0c81312..28ef60c 100644
--- a/node/main.cpp
+++ b/node/main.cpp
@@ -21,6 +21,7 @@ int main(int argc, char* argv[]) {
("interface6,6", po::value<std::string>()->default_value("::"), "Set the ipv6 address to listen on.")
("next_node,n", po::value<std::string>(), "The address of the next node in the network.")
("first,f", "This is the first node and will be the communication point for the clients.")
+ ("last,f", "this is the last node and will be able to send the original message out of the network.")
("cert,c", po::value<std::string>(), "The cert file to use (in pem format).")
("key,k", po::value<std::string>(), "The key file (in pem format).")
("dhparam,d", po::value<std::string>(), "The dhparam file.")
@@ -92,6 +93,7 @@ int main(int argc, char* argv[]) {
BOOST_LOG_TRIVIAL(info) << "Started node";
bool is_first = bool(vm.count("first"));
+ bool is_last = bool(vm.count("last"));
std::string next_node;
if(vm.count("next_node")) {
next_node = vm["next_node"].as<std::string>();
@@ -112,7 +114,7 @@ int main(int argc, char* argv[]) {
Uri uri = parse_uri(next_node);
- NodeNetworkSettings nsettings{is_first, uri.host, uri.port, certdir};
+ NodeNetworkSettings nsettings{is_first, is_last, uri.host, uri.port, certdir};
Node node(lsettings, nsettings);
node.run();