diff options
| author | Jaquee <jaquee.monero@gmail.com> | 2017-10-23 18:33:10 +0200 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2017-10-23 18:16:27 -0500 |
| commit | 8f73bac95c56ea1e887b87fa1d5865effa36b856 (patch) | |
| tree | 8931d03a5f297fb68ddb8da8b2084ea8b814d9b7 /src/libwalletqt | |
| parent | 80a058c954817bf710561cf6866a895e77664805 (diff) | |
| download | monzero-gui-8f73bac95c56ea1e887b87fa1d5865effa36b856.tar.gz monzero-gui-8f73bac95c56ea1e887b87fa1d5865effa36b856.tar.xz monzero-gui-8f73bac95c56ea1e887b87fa1d5865effa36b856.zip | |
add option to change wallet creation height and rescan wallet cache
Diffstat (limited to 'src/libwalletqt')
| -rw-r--r-- | src/libwalletqt/Wallet.cpp | 6 | ||||
| -rw-r--r-- | src/libwalletqt/Wallet.h | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp index 5a71debf..4238940a 100644 --- a/src/libwalletqt/Wallet.cpp +++ b/src/libwalletqt/Wallet.cpp @@ -599,6 +599,12 @@ bool Wallet::useForkRules(quint8 required_version, quint64 earlyBlocks) const } } +void Wallet::setWalletCreationHeight(quint64 height) +{ + m_walletImpl->setRefreshFromBlockHeight(height); + emit walletCreationHeightChanged(); +} + QString Wallet::getDaemonLogPath() const { return QString::fromStdString(m_walletImpl->getDefaultDataDir()) + "/bitmonero.log"; diff --git a/src/libwalletqt/Wallet.h b/src/libwalletqt/Wallet.h index 3fcc057f..adc7d338 100644 --- a/src/libwalletqt/Wallet.h +++ b/src/libwalletqt/Wallet.h @@ -47,7 +47,7 @@ class Wallet : public QObject Q_PROPERTY(QString publicSpendKey READ getPublicSpendKey) Q_PROPERTY(QString daemonLogPath READ getDaemonLogPath CONSTANT) Q_PROPERTY(QString walletLogPath READ getWalletLogPath CONSTANT) - Q_PROPERTY(quint64 walletCreationHeight READ getWalletCreationHeight CONSTANT) + Q_PROPERTY(quint64 walletCreationHeight READ getWalletCreationHeight WRITE setWalletCreationHeight NOTIFY walletCreationHeightChanged) public: @@ -245,6 +245,8 @@ public: QString getPublicSpendKey() const {return QString::fromStdString(m_walletImpl->publicSpendKey());} quint64 getWalletCreationHeight() const {return m_walletImpl->getRefreshFromBlockHeight();} + void setWalletCreationHeight(quint64 height); + QString getDaemonLogPath() const; QString getWalletLogPath() const; @@ -263,6 +265,7 @@ signals: void unconfirmedMoneyReceived(const QString &txId, quint64 amount); void newBlock(quint64 height, quint64 targetHeight); void historyModelChanged() const; + void walletCreationHeightChanged(); // emitted when transaction is created async void transactionCreated(PendingTransaction * transaction, QString address, QString paymentId, quint32 mixinCount); |
