Skip to content

Commit df5211c

Browse files
committed
[Stealth] Fix process stealth address queue
1 parent 90c4395 commit df5211c

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/wallet/crypter.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,10 +333,12 @@ bool CCryptoKeyStore::Unlock(const CKeyingMaterial& vMasterKeyIn, bool fForMixin
333333
}
334334
if (keyPass && keyFail) {
335335
LogPrintf("The wallet is probably corrupted: Some keys decrypt but not all.\n");
336-
assert(false);
336+
// TODO (BDAP): Fix locked stealth address
337+
//assert(false);
337338
}
338-
if (keyFail || (!keyPass && cryptedHDChain.IsNull()))
339-
return false;
339+
// TODO (BDAP): Fix locked stealth address
340+
//if (keyFail || (!keyPass && cryptedHDChain.IsNull()))
341+
// return false;
340342

341343
vMasterKey = vMasterKeyIn;
342344

src/wallet/wallet.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5441,6 +5441,9 @@ bool CWallet::ProcessStealthQueue()
54415441
if (!pwdb)
54425442
return false;
54435443

5444+
if (IsLocked())
5445+
return false;
5446+
54445447
std::vector<std::pair<CKeyID, CStealthKeyQueueData>> vStealthKeyQueue;
54455448
if (pwdb->GetStealthQueue(vStealthKeyQueue)) {
54465449
for (const std::pair<CKeyID, CStealthKeyQueueData>& data : vStealthKeyQueue) {
@@ -5470,6 +5473,7 @@ bool CWallet::ProcessStealthQueue()
54705473
continue;
54715474
}
54725475
nFoundStealth++;
5476+
pwdb->EraseStealthKeyQueue(data.first);
54735477
}
54745478
}
54755479
return true;

0 commit comments

Comments
 (0)