diff options
Diffstat (limited to 'src/main_gui.cpp')
| -rw-r--r-- | src/main_gui.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp index 63bdbb7..9f7e34e 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp | |||
| @@ -61,6 +61,7 @@ static void PrintUsage() | |||
| 61 | printf("\n"); | 61 | printf("\n"); |
| 62 | printf("Network:\n"); | 62 | printf("Network:\n"); |
| 63 | printf(" /port=N (P2P listen port, default 8433)\n"); | 63 | printf(" /port=N (P2P listen port, default 8433)\n"); |
| 64 | printf(" /btfseed=ADDRESS:ENCHEX (extra bootstrap peer, repeatable)\n"); | ||
| 64 | printf("\n"); | 65 | printf("\n"); |
| 65 | printf("Each option also accepts '-' instead of '/'.\n"); | 66 | printf("Each option also accepts '-' instead of '/'.\n"); |
| 66 | } | 67 | } |
| @@ -117,6 +118,25 @@ static void ParseStartupArguments(int argc, char* argv[]) | |||
| 117 | if (!announceRelay.empty()) | 118 | if (!announceRelay.empty()) |
| 118 | strBtfAnnounceRelay = announceRelay; | 119 | strBtfAnnounceRelay = announceRelay; |
| 119 | 120 | ||
| 121 | // /btfseed=ADDRESS:ENCHEX -- extra bootstrap peers, repeatable. Useful for | ||
| 122 | // testing the seed path and for private networks that ship no compiled list. | ||
| 123 | for (int i = 1; i < argc; i++) | ||
| 124 | { | ||
| 125 | string s = argv[i]; | ||
| 126 | size_t eq = s.find('='); | ||
| 127 | if (eq == string::npos) continue; | ||
| 128 | string key = s.substr(0, eq); | ||
| 129 | if (key != "/btfseed" && key != "-btfseed") continue; | ||
| 130 | string val = s.substr(eq + 1); | ||
| 131 | size_t colon = val.rfind(':'); | ||
| 132 | if (colon == string::npos || colon + 1 >= val.size()) | ||
| 133 | { | ||
| 134 | fprintf(stderr, "Ignoring %s: expected ADDRESS:ENCHEX\n", s.c_str()); | ||
| 135 | continue; | ||
| 136 | } | ||
| 137 | vBtfExtraSeeds.push_back(make_pair(val.substr(0, colon), val.substr(colon + 1))); | ||
| 138 | } | ||
| 139 | |||
| 120 | // net.cpp has described nListenPort as "tunable via /port" since it was | 140 | // net.cpp has described nListenPort as "tunable via /port" since it was |
| 121 | // written, but nothing ever read the option, so the port was fixed at 8433 | 141 | // written, but nothing ever read the option, so the port was fixed at 8433 |
| 122 | // and a second node could not start on a machine already running one. | 142 | // and a second node could not start on a machine already running one. |