Skip to content

Commit c820921

Browse files
Merge #6643: refactor: follow-ups for dash#6638
249f2b3 refactor: simplify condition if chain is not crypted in CheckDecryptionKey (Konstantin Akimov) f03b36f refactor: remove unused CChainState definition (Konstantin Akimov) 7cc8f0a fix: removed duplicated check IsMine (Konstantin Akimov) Pull request description: ## Issue being fixed or feature implemented Minor refactorings / improvements for dash#6638 ## What was done? See commits ## How Has This Been Tested? Run unit / functional tests ## Breaking Changes N/A ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 249f2b3 Tree-SHA512: 08c47550a5dce299dcb93d2b1f9af557ed280ce96f1078f2cebbadcaa01b45c806e8a68a11bea53bfa8407996aac195a456fb76edc6c24d1e1bd2cb505d325fb
2 parents 677529c + 249f2b3 commit c820921

File tree

3 files changed

+1
-11
lines changed

3 files changed

+1
-11
lines changed

src/evo/deterministicmns.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828

2929
class CBlock;
3030
class CBlockIndex;
31-
class CChainState;
3231
class CCoinsViewCache;
3332
class CEvoDB;
3433
class TxValidationState;

src/wallet/rpcwallet.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -952,8 +952,6 @@ struct tallyitem
952952

953953
static UniValue ListReceived(const CWallet& wallet, const UniValue& params, const bool by_label, const bool include_immature_coinbase) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
954954
{
955-
AssertLockHeld(wallet.cs_wallet);
956-
957955
// Minimum confirmations
958956
int nMinDepth = 1;
959957
if (!params[0].isNull())
@@ -1032,19 +1030,12 @@ static UniValue ListReceived(const CWallet& wallet, const UniValue& params, cons
10321030
std::map<std::string, tallyitem> label_tally;
10331031

10341032
const auto& func = [&](const CTxDestination& address, const std::string& label, const std::string& purpose, bool is_change)
1035-
EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
10361033
{
1037-
AssertLockHeld(wallet.cs_wallet);
1038-
10391034
if (is_change) return; // no change addresses
10401035
auto it = mapTally.find(address);
10411036
if (it == mapTally.end() && !fIncludeEmpty)
10421037
return;
10431038

1044-
isminefilter mine = wallet.IsMine(address);
1045-
if (!(mine & filter))
1046-
return;
1047-
10481039
CAmount nAmount = 0;
10491040
int nConf = std::numeric_limits<int>::max();
10501041
bool fIsWatchonly = false;

src/wallet/scriptpubkeyman.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ bool LegacyScriptPubKeyMan::CheckDecryptionKey(const CKeyingMaterial& master_key
219219
if (keyFail) {
220220
return false;
221221
}
222-
if (!keyPass && !accept_no_keys && (m_hd_chain.IsNull() || (!m_hd_chain.IsNull() && !m_hd_chain.IsCrypted()))) {
222+
if (!keyPass && !accept_no_keys && (m_hd_chain.IsNull() || !m_hd_chain.IsCrypted())) {
223223
return false;
224224
}
225225

0 commit comments

Comments
 (0)