forked from Public/monero-gui
add WalletManager::useForkRules()
This commit is contained in:
@@ -338,6 +338,16 @@ QString WalletManager::checkUpdates(const QString &software, const QString &subd
|
|||||||
return QString::fromStdString(std::get<1>(result) + "|" + std::get<2>(result) + "|" + std::get<3>(result) + "|" + std::get<4>(result));
|
return QString::fromStdString(std::get<1>(result) + "|" + std::get<2>(result) + "|" + std::get<3>(result) + "|" + std::get<4>(result));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool WalletManager::useForkRules(quint8 required_version) const
|
||||||
|
{
|
||||||
|
quint64 earliest_height;
|
||||||
|
quint8 version;
|
||||||
|
m_pimpl->hardForkInfo(version, earliest_height);
|
||||||
|
return version >= required_version;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
WalletManager::WalletManager(QObject *parent) : QObject(parent)
|
WalletManager::WalletManager(QObject *parent) : QObject(parent)
|
||||||
{
|
{
|
||||||
m_pimpl = Monero::WalletManagerFactory::getWalletManager();
|
m_pimpl = Monero::WalletManagerFactory::getWalletManager();
|
||||||
|
|||||||
@@ -136,6 +136,8 @@ public:
|
|||||||
Q_INVOKABLE bool saveQrCode(const QString &, const QString &) const;
|
Q_INVOKABLE bool saveQrCode(const QString &, const QString &) const;
|
||||||
Q_INVOKABLE QString checkUpdates(const QString &software, const QString &subdir) const;
|
Q_INVOKABLE QString checkUpdates(const QString &software, const QString &subdir) const;
|
||||||
|
|
||||||
|
Q_INVOKABLE bool useForkRules(quint8 version) const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
void walletOpened(Wallet * wallet);
|
void walletOpened(Wallet * wallet);
|
||||||
|
|||||||
Reference in New Issue
Block a user