Page MenuHomePhabricator

qt: Avoid crash on startup if int specified in settings.json
ClosedPublic

Authored by PiRK on Jan 24 2024, 14:38.

Details

Summary

test: Add tests for GetArg methods / settings.json type coercion

qt: Avoid crash on startup if int specified in settings.json

Fix GUI startup crash reported by Rspigler in issue core#24457 that happens if settings.json contains an integer value for any of the configuration options which GUI settings can currently clash with (-dbcache, -par, -spendzeroconfchange, -signer, -upnp, -natpmp, -listen, -server, -proxy, -proxy, -onion, -onion, -lang, and -prune).

The fix is a one-line change in ArgsManager::GetArg. The rest of the PR just adds a regression test for the GUI and unit tests for ArgsManager::GetArg methods.

This is a backport of core#24498
Depends on D15264

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable