diff options
| author | mtg0001 <106211915+mtg0001@users.noreply.github.com> | 2026-08-01 15:15:15 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-01 15:15:15 -0300 |
| commit | a2726cad9e9e11c73ae341ec627a696cdeb63edc (patch) | |
| tree | e8bdce8982ecf38b5a1aeda4aee4d5c000626309 /src/main_gui.cpp | |
| parent | b65c19e559e2fec511f40a4d5481bcf6a35c311c (diff) | |
Add wallet keypool self-test (#91)
Co-authored-by: Gilcimar Duarte <ti@gpm.infra>
Diffstat (limited to 'src/main_gui.cpp')
| -rw-r--r-- | src/main_gui.cpp | 6 |
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 |