diff options
author | Bushstar <bushsolo@gmail.com> | 2023-03-20 11:41:52 +0000 |
---|---|---|
committer | Bushstar <bushsolo@gmail.com> | 2023-03-20 11:41:52 +0000 |
commit | 1869310f3cfa4ab26b5090d8a4002eefdc84870e (patch) | |
tree | fa9bb4060fa845256b22f877900a1eb6e258e11e | |
parent | db03248070f39d795b64894c312311df33521427 (diff) |
refactor: remove unused param from legacy pubkey
-rw-r--r-- | src/wallet/scriptpubkeyman.cpp | 8 | ||||
-rw-r--r-- | src/wallet/scriptpubkeyman.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp index 1589e52deb..db765d9b10 100644 --- a/src/wallet/scriptpubkeyman.cpp +++ b/src/wallet/scriptpubkeyman.cpp @@ -1385,10 +1385,10 @@ void LegacyScriptPubKeyMan::ReturnDestination(int64_t nIndex, bool fInternal, co WalletLogPrintf("keypool return %d\n", nIndex); } -bool LegacyScriptPubKeyMan::GetKeyFromPool(CPubKey& result, const OutputType type, bool internal) +bool LegacyScriptPubKeyMan::GetKeyFromPool(CPubKey& result, const OutputType type) { assert(type != OutputType::BECH32M); - if (!CanGetAddresses(internal)) { + if (!CanGetAddresses(/*internal=*/ false)) { return false; } @@ -1396,10 +1396,10 @@ bool LegacyScriptPubKeyMan::GetKeyFromPool(CPubKey& result, const OutputType typ { LOCK(cs_KeyStore); int64_t nIndex; - if (!ReserveKeyFromKeyPool(nIndex, keypool, internal) && !m_storage.IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)) { + if (!ReserveKeyFromKeyPool(nIndex, keypool, /*fRequestedInternal=*/ false) && !m_storage.IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)) { if (m_storage.IsLocked()) return false; WalletBatch batch(m_storage.GetDatabase()); - result = GenerateNewKey(batch, m_hd_chain, internal); + result = GenerateNewKey(batch, m_hd_chain, /*internal=*/ false); return true; } KeepDestination(nIndex, type); diff --git a/src/wallet/scriptpubkeyman.h b/src/wallet/scriptpubkeyman.h index 4d14325241..42407173c3 100644 --- a/src/wallet/scriptpubkeyman.h +++ b/src/wallet/scriptpubkeyman.h @@ -334,7 +334,7 @@ private: std::map<int64_t, CKeyID> m_index_to_reserved_key; //! Fetches a key from the keypool - bool GetKeyFromPool(CPubKey &key, const OutputType type, bool internal = false); + bool GetKeyFromPool(CPubKey &key, const OutputType type); /** * Reserves a key from the keypool and sets nIndex to its index |