From a2726cad9e9e11c73ae341ec627a696cdeb63edc Mon Sep 17 00:00:00 2001 From: mtg0001 <106211915+mtg0001@users.noreply.github.com> Date: Sat, 1 Aug 2026 15:15:15 -0300 Subject: Add wallet keypool self-test (#91) Co-authored-by: Gilcimar Duarte --- src/main_gui.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main_gui.cpp') 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 @@ // Bitflash entry point -- starts node threads then runs GUI (or headless). #include "headers_core.h" +#include "selftest.h" #include // hardware_concurrency, to sanity-check /genproclimit #ifndef _WIN32 #include @@ -48,6 +49,7 @@ static void PrintUsage() printf(" /debug\n"); printf(" /gen\n"); printf(" /nogui or /daemon\n"); + printf(" /selftest=wallet-keypool\n"); printf("\n"); printf("Mining mode:\n"); printf(" /operator\n"); @@ -219,6 +221,10 @@ int main(int argc, char* argv[]) ParseStartupArguments(argc, argv); + string strSelfTest = argval2(argc, argv, "/selftest", "-selftest"); + if (!strSelfTest.empty()) + return RunSelfTest(strSelfTest); + // Berkeley DB reports failure by throwing, and CDB's constructor lets it // through. Nothing on this path caught anything, so an unreadable // blkindex.dat or wallet.dat -- one written by another platform's Berkeley -- cgit v1.2.3