upleb.uk

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

summaryrefslogtreecommitdiff
path: root/tests/scripts/test_bitflash_tools.py
diff options
context:
space:
mode:
authorBitflash <admin@bitflash.network>2026-08-07 18:40:19 -0300
committerBitflash <admin@bitflash.network>2026-08-07 18:40:19 -0300
commit534cdc2675378a1213b4999fbd6b03f6f0b6ffbc (patch)
treec607f9b16e3d5bd455c410437180e605f6137b97 /tests/scripts/test_bitflash_tools.py
parentb1eb8b66b8d7b47c7fb2e85d5d4db86a11823366 (diff)
shutdown: flush wallet.dat on Windows headless stop
The headless loop installed SIGINT/SIGTERM handlers only under #ifndef _WIN32, so a headless node on Windows never reached the clean StopNode()+DBFlush() path: Ctrl-C, closing the console window, a service stop and OS shutdown all killed it mid-write, and a Berkeley DB wallet.dat left unflushed will not reopen. Install a SetConsoleCtrlHandler that mirrors the POSIX path: set fShutdown and, because the OS terminates us shortly after the handler returns on CLOSE/LOGOFF/SHUTDOWN, block until the main loop signals the flush is done. A 'taskkill /F' is still an uncatchable hard kill by design. Closes #16.
Diffstat (limited to 'tests/scripts/test_bitflash_tools.py')
0 files changed, 0 insertions, 0 deletions