forked from Public/monero-gui
useForkRules() - Catch no connection error
This commit is contained in:
@@ -589,7 +589,14 @@ bool Wallet::rescanSpent()
|
|||||||
|
|
||||||
bool Wallet::useForkRules(quint8 required_version, quint64 earlyBlocks) const
|
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)
|
Wallet::Wallet(Monero::Wallet *w, QObject *parent)
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ public:
|
|||||||
Q_INVOKABLE bool rescanSpent();
|
Q_INVOKABLE bool rescanSpent();
|
||||||
|
|
||||||
// check if fork rules should be used
|
// 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
|
// TODO: setListenter() when it implemented in API
|
||||||
signals:
|
signals:
|
||||||
|
|||||||
Reference in New Issue
Block a user