aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libwalletqt/Wallet.cpp9
-rw-r--r--src/libwalletqt/Wallet.h2
2 files changed, 9 insertions, 2 deletions
diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp
index 6f397766..b79d77e5 100644
--- a/src/libwalletqt/Wallet.cpp
+++ b/src/libwalletqt/Wallet.cpp
@@ -589,7 +589,14 @@ bool Wallet::rescanSpent()
bool Wallet::useForkRules(quint8 required_version, quint64 earlyBlocks) const
{
- return m_walletImpl->useForkRules(required_version,earlyBlocks);
+ if(m_connectionStatus == Wallet::ConnectionStatus_Disconnected)
+ return false;
+ try {
+ return m_walletImpl->useForkRules(required_version,earlyBlocks);
+ } catch (const std::exception &e) {
+ qDebug() << e.what();
+ return false;
+ }
}
Wallet::Wallet(Monero::Wallet *w, QObject *parent)
diff --git a/src/libwalletqt/Wallet.h b/src/libwalletqt/Wallet.h
index 187df16f..9477f896 100644
--- a/src/libwalletqt/Wallet.h
+++ b/src/libwalletqt/Wallet.h
@@ -229,7 +229,7 @@ public:
Q_INVOKABLE bool rescanSpent();
// check if fork rules should be used
- Q_INVOKABLE bool useForkRules(quint8 version, quint64 earlyBlocks) const;
+ Q_INVOKABLE bool useForkRules(quint8 version, quint64 earlyBlocks = 0) const;
// TODO: setListenter() when it implemented in API
signals: