Currently, if users provide a double negated value such as ‘-nowallet=0’ or a non-boolean convertible value to a negated option such as ‘-nowallet=not_a_boolean’, the initialization process results in a fatal error, causing an unclean shutdown and displaying a poorly descriptive error message: “JSON value of type bool is not of expected type string.” (On bitcoind. The GUI does not display any error msg - upcoming PR -).
This PR fixes the issue by ensuring that only string values are returned in the the “wallet” settings list, failing otherwise. It also improves the clarity of the returned error message.
Note:
This bug was introduced in #22217. Where the GetArgs("-wallet")
call was
replaced by GetSettingsList("-wallet")
.