I expect that there are many users with load on startup wallet definitions in bitcoin.conf or via startup CLI argument.
With the new settings.json r/w configuration file, users unloading and loading a wallet through the GUI or via the RPC calls might end up with a duplicate -wallet entry (one that still remains in bitcoin.conf or CLI) plus the new duplication in settings.json due to the unload/load.
Steps to reproduce
- create wallet (if via RPC set load_on_startup or unloadwallet/loadwallet then set load_on_startup).
- stop bitcoin
- start bitcoind again with same --wallet=mywallet
I guess it is acceptable to skip duplicates.
This is a backport of core#20199