Skip to content

Commit

Permalink
Remove unused member wallet in UnlockContext inner class
Browse files Browse the repository at this point in the history
  • Loading branch information
jonspock committed Oct 8, 2017
1 parent bc63f24 commit 9bee2ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/qt/walletmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -558,13 +558,11 @@ WalletModel::UnlockContext WalletModel::requestUnlock(bool relock)
// If wallet is still locked, unlock was failed or cancelled, mark context as invalid
bool valid = getEncryptionStatus() != Locked;

return UnlockContext(this, valid, relock);
return UnlockContext(valid, relock);
// return UnlockContext(this, valid, was_locked && !isAnonymizeOnlyUnlocked());
}

WalletModel::UnlockContext::UnlockContext(WalletModel* wallet, bool valid, bool relock) : wallet(wallet),
valid(valid),
relock(relock)
WalletModel::UnlockContext::UnlockContext(bool valid, bool relock) : valid(valid), relock(relock)
{
}

Expand Down
3 changes: 1 addition & 2 deletions src/qt/walletmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class WalletModel : public QObject
class UnlockContext
{
public:
UnlockContext(WalletModel* wallet, bool valid, bool relock);
UnlockContext(bool valid, bool relock);
~UnlockContext();

bool isValid() const { return valid; }
Expand All @@ -187,7 +187,6 @@ class WalletModel : public QObject
}

private:
WalletModel* wallet;
bool valid;
mutable bool relock; // mutable, as it can be set to false by copying

Expand Down

0 comments on commit 9bee2ca

Please sign in to comment.