Skip to content

Conversation

@promag
Copy link
Contributor

@promag promag commented Jun 6, 2021

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_s fails
  • running daemon with -nowallet and calling cli loadwallet ledger_nano_s fails
  • repeating loadwallet after 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.

@promag
Copy link
Contributor Author

promag commented Jun 6, 2021

@achow101 not sure its the best place to check for this, please advice.

@fanquake fanquake added the Wallet label Jun 6, 2021
@achow101
Copy link
Member

achow101 commented Jun 6, 2021

This is definitely not the way. The correct way would be to check the flags at the beginning of loading and error out of the external signer is not supported. I'll make a PR.

@promag promag closed this Jun 6, 2021
@promag promag deleted the 2021-06-wallet-extsig branch June 6, 2021 18:02
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jun 9, 2021
…n unsupported

e60cd26 Do not load external signers wallets when unsupported (Andrew Chow)

Pull request description:

  When external signer support is not compiled, do not load external signer wallets.

  Alternative to bitcoin#22168.

ACKs for top commit:
  promag:
    Tested ACK e60cd26.
  meshcollider:
    Code review ACK e60cd26

Tree-SHA512: aed2d0038f448c2f89c6b48f412b106e63c9ed20e748e69aae21fb58c33fc7e4fa73375a52372c73788669eb2b968a8da6b022c65658fa4484f5bbcf205b1b15
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants