When a non-empty wallet with the WALLET_FLAG_EXTERNAL_SIGNER
flag is supposed to be auto-loaded, i.e., it is mentioned in the settings.json
file, and binaries are built with the --disable-external-signer
configure option, the bitcoind
fails:
0...
12021-05-11T12:07:20Z [init] Using SQLite Version 3.31.1
22021-05-11T12:07:20Z [init] Using wallet /home/hebasto/.bitcoin/testnet3/wallets/coldcard_t
32021-05-11T12:07:20Z [init] init message: Loading wallet…
42021-05-11T12:07:20Z [init] [coldcard_t] LoadDescriptorScriptPubKeyMan: Compiled without external signing support (required for external signing)
52021-05-11T12:07:20Z [init] [coldcard_t] LoadDescriptorScriptPubKeyMan: Compiled without external signing support (required for external signing)
62021-05-11T12:07:20Z [init] [coldcard_t] LoadDescriptorScriptPubKeyMan: Compiled without external signing support (required for external signing)
72021-05-11T12:07:20Z [init] [coldcard_t] LoadDescriptorScriptPubKeyMan: Compiled without external signing support (required for external signing)
82021-05-11T12:07:20Z [init] [coldcard_t] LoadDescriptorScriptPubKeyMan: Compiled without external signing support (required for external signing)
92021-05-11T12:07:20Z [init] [coldcard_t] LoadDescriptorScriptPubKeyMan: Compiled without external signing support (required for external signing)
102021-05-11T12:07:20Z [init] [coldcard_t] Setting spkMan to active: id = c2fe2eddfccf102a74da940e282062adc8c13fbd28d00477644d3fcd1f6efe5d, type = 0, internal = 0
112021-05-11T12:07:20Z [init] [coldcard_t] Releasing wallet
122021-05-11T12:07:20Z [init]
13
14************************
15EXCEPTION: St12out_of_range
16map::at
17bitcoin in AppInit()
18
19
20
21************************
22EXCEPTION: St12out_of_range
23map::at
24bitcoin in AppInit()
25
262021-05-11T12:07:20Z [init] Shutdown: In progress...
272021-05-11T12:07:20Z [scheduler] scheduler thread exit
282021-05-11T12:07:21Z [shutoff] FlushStateToDisk: write coins cache to disk (0 coins, 0kB) started
292021-05-11T12:07:21Z [shutoff] FlushStateToDisk: write coins cache to disk (0 coins, 0kB) completed (0.00s)
302021-05-11T12:07:21Z [shutoff] FlushStateToDisk: write coins cache to disk (0 coins, 0kB) started
312021-05-11T12:07:21Z [shutoff] FlushStateToDisk: write coins cache to disk (0 coins, 0kB) completed (0.00s)
322021-05-11T12:07:21Z [shutoff] [w20191120] Releasing wallet
332021-05-11T12:07:21Z [shutoff] [watch-only] Releasing wallet
342021-05-11T12:07:21Z [shutoff] [default wallet] Releasing wallet
352021-05-11T12:07:21Z [shutoff] Shutdown: done
The reason is the CWallet::Create
throws an exception that is not caught in https://github.com/bitcoin/bitcoin/blob/e175a20769b5a7b98ee3082d89f9d4f31a4503d6/src/wallet/load.cpp#L117-L120
With the following diff
0--- a/src/wallet/load.cpp
1+++ b/src/wallet/load.cpp
2@@ -117,6 +117,9 @@ bool LoadWallets(interfaces::Chain& chain)
3 } catch (const std::runtime_error& e) {
4 chain.initError(Untranslated(e.what()));
5 return false;
6+ } catch (const std::exception& e) {
7+ chain.initError(Untranslated(e.what()));
8+ return false;
9 }
10 }
11
the bitcoind
output is:
0...
12021-05-11T12:18:21Z [init] Using SQLite Version 3.31.1
22021-05-11T12:18:21Z [init] Using wallet /home/hebasto/.bitcoin/testnet3/wallets/coldcard_t
32021-05-11T12:18:21Z [init] init message: Loading wallet…
42021-05-11T12:18:21Z [init] [coldcard_t] LoadDescriptorScriptPubKeyMan: Compiled without external signing support (required for external signing)
52021-05-11T12:18:21Z [init] [coldcard_t] LoadDescriptorScriptPubKeyMan: Compiled without external signing support (required for external signing)
62021-05-11T12:18:21Z [init] [coldcard_t] LoadDescriptorScriptPubKeyMan: Compiled without external signing support (required for external signing)
72021-05-11T12:18:21Z [init] [coldcard_t] LoadDescriptorScriptPubKeyMan: Compiled without external signing support (required for external signing)
82021-05-11T12:18:21Z [init] [coldcard_t] LoadDescriptorScriptPubKeyMan: Compiled without external signing support (required for external signing)
92021-05-11T12:18:21Z [init] [coldcard_t] LoadDescriptorScriptPubKeyMan: Compiled without external signing support (required for external signing)
102021-05-11T12:18:21Z [init] [coldcard_t] Setting spkMan to active: id = c2fe2eddfccf102a74da940e282062adc8c13fbd28d00477644d3fcd1f6efe5d, type = 0, internal = 0
112021-05-11T12:18:21Z [init] [coldcard_t] Releasing wallet
122021-05-11T12:18:21Z [init] Error: map::at
13Error: map::at
142021-05-11T12:18:21Z [init] Shutdown: In progress...
152021-05-11T12:18:22Z [scheduler] scheduler thread exit
162021-05-11T12:18:22Z [shutoff] FlushStateToDisk: write coins cache to disk (0 coins, 0kB) started
172021-05-11T12:18:22Z [shutoff] FlushStateToDisk: write coins cache to disk (0 coins, 0kB) completed (0.00s)
182021-05-11T12:18:22Z [shutoff] FlushStateToDisk: write coins cache to disk (0 coins, 0kB) started
192021-05-11T12:18:22Z [shutoff] FlushStateToDisk: write coins cache to disk (0 coins, 0kB) completed (0.00s)
202021-05-11T12:18:23Z [shutoff] [w20191120] Releasing wallet
212021-05-11T12:18:23Z [shutoff] [watch-only] Releasing wallet
222021-05-11T12:18:23Z [shutoff] [default wallet] Releasing wallet
232021-05-11T12:18:23Z [shutoff] Shutdown: done
Noted while reviewing https://github.com/bitcoin-core/gui/pull/4.