From 2471ce20db9fb455761ca7c495d737f7e5e9aa3c Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 9 Aug 2021 17:40:17 -0400 Subject: [PATCH] Improve handling of custom addnodes --- src/hush_utils.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/hush_utils.h b/src/hush_utils.h index d7f56ea87..194a6559d 100644 --- a/src/hush_utils.h +++ b/src/hush_utils.h @@ -1810,7 +1810,14 @@ void hush_args(char *argv0) vector HUSH_nodes= {"node1.hush.is","node2.hush.is","node3.hush.is", "node4.hush.is","node5.hush.is","node6.hush.is", "node7.hush.is","node8.hush.is"}; - mapMultiArgs["-addnode"] = HUSH_nodes; + vector more_nodes = mapMultiArgs["-addnode"]; + if (more_nodes.size() > 0) { + fprintf(stderr,"Adding %d more nodes via custom -addnode arguments", more_nodes.size() ); + } + // Add default HUSH nodes after custom addnodes + more_nodes.insert( more_nodes.end(), HUSH_nodes.begin(), HUSH_nodes.end() ); + + mapMultiArgs["-addnode"] = more_nodes; HUSH_STOPAT = GetArg("-stopat",0); MAX_REORG_LENGTH = GetArg("-maxreorg",MAX_REORG_LENGTH); WITNESS_CACHE_SIZE = MAX_REORG_LENGTH+10;