Wallet encryption

This commit is contained in:
Aditya Kulkarni
2019-10-30 13:54:42 -07:00
parent 48e5846899
commit cfc2f85b08
12 changed files with 437 additions and 30 deletions

View File

@@ -28,6 +28,9 @@ public:
void setLatestBlock(int blockHeight);
int getLatestBlock() { return this->latestBlock; }
void setEncryptionStatus(bool encrypted, bool locked) { this->isEncrypted = encrypted; this->isLocked = locked; }
QPair<bool, bool> getEncryptionStatus() { return qMakePair(this->isEncrypted, this->isLocked); }
const QList<QString> getAllZAddresses() { QReadLocker locker(lock); return *zaddresses; }
const QList<QString> getAllTAddresses() { QReadLocker locker(lock); return *taddresses; }
const QList<UnspentOutput> getUTXOs() { QReadLocker locker(lock); return *utxos; }
@@ -42,6 +45,9 @@ public:
private:
int latestBlock;
bool isEncrypted = false;
bool isLocked = false;
QList<UnspentOutput>* utxos = nullptr;
QMap<QString, CAmount>* balances = nullptr;
QMap<QString, bool>* usedAddresses = nullptr;