Summary
This is a follow-up to #35384 (comment)
- CBanDB::Write now writes banlist.json.tmp and uses RenameOver, so a failed/interrupted write can’t leave a truncated banlist.json (same pattern as settings.json).
- Renamed common::WriteSettings → common::WriteJsonUnsafe and documented that callers must pair it with an atomic rename.
- Added a unit test that checks the write/read roundtrip and that the .tmp file is gone after success.