Skip to content

Commit a0d37d1

Browse files
committed
Merge bitcoin/bitcoin#27274: refactor: remove unused param from legacy pubkey interface
1869310 refactor: remove unused param from legacy pubkey (Bushstar) Pull request description: Unused param present in legacy pubkey manager interface. This param will not be used and should be removed to prevent unintended usage. ACKs for top commit: Sjors: ACK 1869310 furszy: ACK 1869310 Tree-SHA512: 0fb41fc8f481f859262f2e8e9a93c990c1b4637e74fd9191ccc0b3c523d0e7d94217a3074bb357276e1941a10d29326f850f9b27eccc1eca57cf6b549353400c
2 parents 5c2bb2b + 1869310 commit a0d37d1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/wallet/scriptpubkeyman.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -1385,21 +1385,21 @@ void LegacyScriptPubKeyMan::ReturnDestination(int64_t nIndex, bool fInternal, co
13851385
WalletLogPrintf("keypool return %d\n", nIndex);
13861386
}
13871387

1388-
bool LegacyScriptPubKeyMan::GetKeyFromPool(CPubKey& result, const OutputType type, bool internal)
1388+
bool LegacyScriptPubKeyMan::GetKeyFromPool(CPubKey& result, const OutputType type)
13891389
{
13901390
assert(type != OutputType::BECH32M);
1391-
if (!CanGetAddresses(internal)) {
1391+
if (!CanGetAddresses(/*internal=*/ false)) {
13921392
return false;
13931393
}
13941394

13951395
CKeyPool keypool;
13961396
{
13971397
LOCK(cs_KeyStore);
13981398
int64_t nIndex;
1399-
if (!ReserveKeyFromKeyPool(nIndex, keypool, internal) && !m_storage.IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)) {
1399+
if (!ReserveKeyFromKeyPool(nIndex, keypool, /*fRequestedInternal=*/ false) && !m_storage.IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)) {
14001400
if (m_storage.IsLocked()) return false;
14011401
WalletBatch batch(m_storage.GetDatabase());
1402-
result = GenerateNewKey(batch, m_hd_chain, internal);
1402+
result = GenerateNewKey(batch, m_hd_chain, /*internal=*/ false);
14031403
return true;
14041404
}
14051405
KeepDestination(nIndex, type);

src/wallet/scriptpubkeyman.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ class LegacyScriptPubKeyMan : public ScriptPubKeyMan, public FillableSigningProv
334334
std::map<int64_t, CKeyID> m_index_to_reserved_key;
335335

336336
//! Fetches a key from the keypool
337-
bool GetKeyFromPool(CPubKey &key, const OutputType type, bool internal = false);
337+
bool GetKeyFromPool(CPubKey &key, const OutputType type);
338338

339339
/**
340340
* Reserves a key from the keypool and sets nIndex to its index

0 commit comments

Comments
 (0)