ui_interface: remove unused NotifyBlocksChanged signal
This commit is contained in:
parent
7accb7dbad
commit
beb36e800c
@ -1386,10 +1386,8 @@ void Misbehaving(NodeId pnode, int howmuch)
|
|||||||
void static InvalidChainFound(CBlockIndex* pindexNew)
|
void static InvalidChainFound(CBlockIndex* pindexNew)
|
||||||
{
|
{
|
||||||
if (!pindexBestInvalid || pindexNew->nChainWork > pindexBestInvalid->nChainWork)
|
if (!pindexBestInvalid || pindexNew->nChainWork > pindexBestInvalid->nChainWork)
|
||||||
{
|
|
||||||
pindexBestInvalid = pindexNew;
|
pindexBestInvalid = pindexNew;
|
||||||
uiInterface.NotifyBlocksChanged();
|
|
||||||
}
|
|
||||||
LogPrintf("InvalidChainFound: invalid block=%s height=%d log2_work=%.8g date=%s\n",
|
LogPrintf("InvalidChainFound: invalid block=%s height=%d log2_work=%.8g date=%s\n",
|
||||||
pindexNew->GetBlockHash().ToString(), pindexNew->nHeight,
|
pindexNew->GetBlockHash().ToString(), pindexNew->nHeight,
|
||||||
log(pindexNew->nChainWork.getdouble())/log(2.0), DateTimeStrFormat("%Y-%m-%d %H:%M:%S",
|
log(pindexNew->nChainWork.getdouble())/log(2.0), DateTimeStrFormat("%Y-%m-%d %H:%M:%S",
|
||||||
@ -2175,7 +2173,6 @@ bool ActivateBestChain(CValidationState &state) {
|
|||||||
boost::thread t(runCommand, strCmd); // thread runs free
|
boost::thread t(runCommand, strCmd); // thread runs free
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uiInterface.NotifyBlocksChanged();
|
|
||||||
} while(pindexMostWork != chainActive.Tip());
|
} while(pindexMostWork != chainActive.Tip());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -208,12 +208,6 @@ static void ShowProgress(ClientModel *clientmodel, const std::string &title, int
|
|||||||
Q_ARG(int, nProgress));
|
Q_ARG(int, nProgress));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void NotifyBlocksChanged(ClientModel *clientmodel)
|
|
||||||
{
|
|
||||||
// This notification is too frequent. Don't trigger a signal.
|
|
||||||
// Don't remove it, though, as it might be useful later.
|
|
||||||
}
|
|
||||||
|
|
||||||
static void NotifyNumConnectionsChanged(ClientModel *clientmodel, int newNumConnections)
|
static void NotifyNumConnectionsChanged(ClientModel *clientmodel, int newNumConnections)
|
||||||
{
|
{
|
||||||
// Too noisy: qDebug() << "NotifyNumConnectionsChanged : " + QString::number(newNumConnections);
|
// Too noisy: qDebug() << "NotifyNumConnectionsChanged : " + QString::number(newNumConnections);
|
||||||
@ -233,7 +227,6 @@ void ClientModel::subscribeToCoreSignals()
|
|||||||
{
|
{
|
||||||
// Connect signals to client
|
// Connect signals to client
|
||||||
uiInterface.ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2));
|
uiInterface.ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2));
|
||||||
uiInterface.NotifyBlocksChanged.connect(boost::bind(NotifyBlocksChanged, this));
|
|
||||||
uiInterface.NotifyNumConnectionsChanged.connect(boost::bind(NotifyNumConnectionsChanged, this, _1));
|
uiInterface.NotifyNumConnectionsChanged.connect(boost::bind(NotifyNumConnectionsChanged, this, _1));
|
||||||
uiInterface.NotifyAlertChanged.connect(boost::bind(NotifyAlertChanged, this, _1, _2));
|
uiInterface.NotifyAlertChanged.connect(boost::bind(NotifyAlertChanged, this, _1, _2));
|
||||||
}
|
}
|
||||||
@ -242,7 +235,6 @@ void ClientModel::unsubscribeFromCoreSignals()
|
|||||||
{
|
{
|
||||||
// Disconnect signals from client
|
// Disconnect signals from client
|
||||||
uiInterface.ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
|
uiInterface.ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
|
||||||
uiInterface.NotifyBlocksChanged.disconnect(boost::bind(NotifyBlocksChanged, this));
|
|
||||||
uiInterface.NotifyNumConnectionsChanged.disconnect(boost::bind(NotifyNumConnectionsChanged, this, _1));
|
uiInterface.NotifyNumConnectionsChanged.disconnect(boost::bind(NotifyNumConnectionsChanged, this, _1));
|
||||||
uiInterface.NotifyAlertChanged.disconnect(boost::bind(NotifyAlertChanged, this, _1, _2));
|
uiInterface.NotifyAlertChanged.disconnect(boost::bind(NotifyAlertChanged, this, _1, _2));
|
||||||
}
|
}
|
||||||
|
@ -78,9 +78,6 @@ public:
|
|||||||
/** Translate a message to the native language of the user. */
|
/** Translate a message to the native language of the user. */
|
||||||
boost::signals2::signal<std::string (const char* psz)> Translate;
|
boost::signals2::signal<std::string (const char* psz)> Translate;
|
||||||
|
|
||||||
/** Block chain changed. */
|
|
||||||
boost::signals2::signal<void ()> NotifyBlocksChanged;
|
|
||||||
|
|
||||||
/** Number of network connections changed. */
|
/** Number of network connections changed. */
|
||||||
boost::signals2::signal<void (int newNumConnections)> NotifyNumConnectionsChanged;
|
boost::signals2::signal<void (int newNumConnections)> NotifyNumConnectionsChanged;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user