upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/main_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main_gui.cpp')
-rw-r--r--src/main_gui.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index c9e27a9..2bcdb83 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -1,6 +1,7 @@
1// Bitflash entry point -- starts node threads then runs GUI (or headless). 1// Bitflash entry point -- starts node threads then runs GUI (or headless).
2 2
3#include "headers_core.h" 3#include "headers_core.h"
4#include "selftest.h"
4#include <thread> // hardware_concurrency, to sanity-check /genproclimit 5#include <thread> // hardware_concurrency, to sanity-check /genproclimit
5#ifndef _WIN32 6#ifndef _WIN32
6#include <csignal> 7#include <csignal>
@@ -48,6 +49,7 @@ static void PrintUsage()
48 printf(" /debug\n"); 49 printf(" /debug\n");
49 printf(" /gen\n"); 50 printf(" /gen\n");
50 printf(" /nogui or /daemon\n"); 51 printf(" /nogui or /daemon\n");
52 printf(" /selftest=wallet-keypool\n");
51 printf("\n"); 53 printf("\n");
52 printf("Mining mode:\n"); 54 printf("Mining mode:\n");
53 printf(" /operator\n"); 55 printf(" /operator\n");
@@ -219,6 +221,10 @@ int main(int argc, char* argv[])
219 221
220 ParseStartupArguments(argc, argv); 222 ParseStartupArguments(argc, argv);
221 223
224 string strSelfTest = argval2(argc, argv, "/selftest", "-selftest");
225 if (!strSelfTest.empty())
226 return RunSelfTest(strSelfTest);
227
222 // Berkeley DB reports failure by throwing, and CDB's constructor lets it 228 // Berkeley DB reports failure by throwing, and CDB's constructor lets it
223 // through. Nothing on this path caught anything, so an unreadable 229 // through. Nothing on this path caught anything, so an unreadable
224 // blkindex.dat or wallet.dat -- one written by another platform's Berkeley 230 // blkindex.dat or wallet.dat -- one written by another platform's Berkeley