Skip to content

Commit 8fdbb89

Browse files
committed
refactor: unify external wallet runtime errors
Rather than 3 different messages that are confusing / leak implementation details, use a single message, that is similar to other wallet related messages. i.e: "Compiled without sqlite support (required for descriptor wallets)".
1 parent f4652bf commit 8fdbb89

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2750,7 +2750,7 @@ static RPCHelpMan createwallet()
27502750
#ifdef ENABLE_EXTERNAL_SIGNER
27512751
flags |= WALLET_FLAG_EXTERNAL_SIGNER;
27522752
#else
2753-
throw JSONRPCError(RPC_WALLET_ERROR, "Configure with --enable-external-signer to use this");
2753+
throw JSONRPCError(RPC_WALLET_ERROR, "Compiled without external signing support (required for external signing)");
27542754
#endif
27552755
}
27562756

src/wallet/wallet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4516,7 +4516,7 @@ void CWallet::LoadDescriptorScriptPubKeyMan(uint256 id, WalletDescriptor& desc)
45164516
auto spk_manager = std::unique_ptr<ScriptPubKeyMan>(new ExternalSignerScriptPubKeyMan(*this, desc));
45174517
m_spk_managers[id] = std::move(spk_manager);
45184518
#else
4519-
throw std::runtime_error(std::string(__func__) + ": Configure with --enable-external-signer to use external signer wallets");
4519+
throw std::runtime_error(std::string(__func__) + ": Compiled without external signing support (required for external signing)");
45204520
#endif
45214521
} else {
45224522
auto spk_manager = std::unique_ptr<ScriptPubKeyMan>(new DescriptorScriptPubKeyMan(*this, desc));
@@ -4585,7 +4585,7 @@ void CWallet::SetupDescriptorScriptPubKeyMans()
45854585
}
45864586
}
45874587
#else
4588-
throw std::runtime_error(std::string(__func__) + ": Wallets with external signers require Boost::Process library.");
4588+
throw std::runtime_error(std::string(__func__) + ": Compiled without external signing support (required for external signing)");
45894589
#endif // ENABLE_EXTERNAL_SIGNER
45904590
}
45914591
}

0 commit comments

Comments
 (0)