Files
bitcoin/src/test/settings_tests.cpp
Shrey ca00827fab util: Check write failures before renaming settings.json
In WriteSettings(), verify that writing to the stream and closing it
succeeded before returning true. This prevents RenameOver() from replacing
a valid settings.json with a corrupted or zero-byte file when write limits
or a full disk are encountered.

Additionally, update the ReadSettings() parse failure message to mention
power loss, full disk, or storage error as possible causes.

Fixes #35373

Github-Pull: #35384
Rebased-From: 0654511e1b
2026-06-19 18:47:09 +02:00

10 KiB