To reproduce the exception:
- build with
--enable-external-signer - create a wallet, lets say
ledger_nano_s - now build with
--disable-external-signer - running daemon with
-wallet=ledger_nano_sfails - running daemon with
-nowalletand callingcli loadwallet ledger_nano_sfails - repeating
loadwalletafter the above gives “wallet already loaded”
The exception is std::out_of_range from std::map::at raised by auto spk_man = m_spk_managers.at(id).get().
Fix this by early checking for ENABLE_EXTERNAL_SIGNER.