Skip to content

Commit a0389e1

Browse files
committed
refactor: rename EncryptHDChain to EncryptAndSetHDChain
1 parent b2143f9 commit a0389e1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/wallet/scriptpubkeyman.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ bool LegacyScriptPubKeyMan::Encrypt(const CKeyingMaterial& master_key, WalletBat
267267
}
268268

269269
if (!hdChainCurrent.IsNull()) {
270-
assert(EncryptHDChain(master_key));
270+
assert(EncryptAndSetHDChain(master_key));
271271

272272
CHDChain hdChainCrypted;
273273
assert(GetHDChain(hdChainCrypted));
@@ -396,7 +396,7 @@ void LegacyScriptPubKeyMan::GenerateNewCryptedHDChain(const SecureString& secure
396396
hdChainTmp.AddAccount();
397397
hdChainTmp.Debug(__func__);
398398

399-
bool res = EncryptHDChain(vMasterKey, hdChainTmp);
399+
bool res = EncryptAndSetHDChain(vMasterKey, hdChainTmp);
400400
assert(res);
401401

402402
CHDChain hdChainCrypted;
@@ -494,7 +494,7 @@ bool LegacyScriptPubKeyMan::GetDecryptedHDChain(CHDChain& hdChainRet)
494494
return true;
495495
}
496496

497-
bool LegacyScriptPubKeyMan::EncryptHDChain(const CKeyingMaterial& vMasterKeyIn, const CHDChain& chain)
497+
bool LegacyScriptPubKeyMan::EncryptAndSetHDChain(const CKeyingMaterial& vMasterKeyIn, const CHDChain& chain)
498498
{
499499
LOCK(cs_KeyStore);
500500
// should call EncryptKeys first

src/wallet/scriptpubkeyman.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ class LegacyScriptPubKeyMan : public ScriptPubKeyMan, public FillableSigningProv
277277
/* Set the HD chain model (chain child index counters) */
278278
bool SetHDChain(WalletBatch &batch, const CHDChain& chain, bool memonly);
279279

280-
bool EncryptHDChain(const CKeyingMaterial& vMasterKeyIn, const CHDChain& chain = CHDChain());
280+
bool EncryptAndSetHDChain(const CKeyingMaterial& vMasterKeyIn, const CHDChain& chain = CHDChain());
281281
bool DecryptHDChain(const CKeyingMaterial& vMasterKeyIn, CHDChain& hdChainRet) const;
282282
bool SetHDChain(const CHDChain& chain);
283283

0 commit comments

Comments
 (0)