wallet: remove CWallet::GetExternalSigner()
This commit is contained in:
2 files changed
+1
-17
No files matched your search
+1
-14
@@ -3594,19 +3594,6 @@ void ReserveDestination::ReturnDestination()
|
|||||||
address = CNoDestination();
|
address = CNoDestination();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_EXTERNAL_SIGNER
|
|
||||||
ExternalSigner CWallet::GetExternalSigner()
|
|
||||||
{
|
|
||||||
const std::string command = gArgs.GetArg("-signer", "");
|
|
||||||
if (command == "") throw std::runtime_error(std::string(__func__) + ": restart bitcoind with -signer=<cmd>");
|
|
||||||
std::vector<ExternalSigner> signers;
|
|
||||||
ExternalSigner::Enumerate(command, signers, Params().NetworkIDString());
|
|
||||||
if (signers.empty()) throw std::runtime_error(std::string(__func__) + ": No external signers found");
|
|
||||||
// TODO: add fingerprint argument in case of multiple signers
|
|
||||||
return signers[0];
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool CWallet::DisplayAddress(const CTxDestination& dest)
|
bool CWallet::DisplayAddress(const CTxDestination& dest)
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_EXTERNAL_SIGNER
|
#ifdef ENABLE_EXTERNAL_SIGNER
|
||||||
@@ -3619,7 +3606,7 @@ bool CWallet::DisplayAddress(const CTxDestination& dest)
|
|||||||
if (signer_spk_man == nullptr) {
|
if (signer_spk_man == nullptr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ExternalSigner signer = GetExternalSigner(); // TODO: move signer in spk_man
|
ExternalSigner signer = ExternalSignerScriptPubKeyMan::GetExternalSigner();
|
||||||
return signer_spk_man->DisplayAddress(scriptPubKey, signer);
|
return signer_spk_man->DisplayAddress(scriptPubKey, signer);
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -845,9 +845,6 @@ public:
|
|||||||
|
|
||||||
std::vector<OutputGroup> GroupOutputs(const std::vector<COutput>& outputs, bool separate_coins, const CFeeRate& effective_feerate, const CFeeRate& long_term_feerate, const CoinEligibilityFilter& filter, bool positive_only) const;
|
std::vector<OutputGroup> GroupOutputs(const std::vector<COutput>& outputs, bool separate_coins, const CFeeRate& effective_feerate, const CFeeRate& long_term_feerate, const CoinEligibilityFilter& filter, bool positive_only) const;
|
||||||
|
|
||||||
#ifdef ENABLE_EXTERNAL_SIGNER
|
|
||||||
ExternalSigner GetExternalSigner() EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
|
|
||||||
#endif
|
|
||||||
/** Display address on an external signer. Returns false if external signer support is not compiled */
|
/** Display address on an external signer. Returns false if external signer support is not compiled */
|
||||||
bool DisplayAddress(const CTxDestination& dest) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
|
bool DisplayAddress(const CTxDestination& dest) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user