From cfb9bd15b02e0d7c914cb00b8216d44089b11b37 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Tue, 19 May 2015 23:29:13 +0200 Subject: [PATCH] Tidy up notifications. --- alethzero/MainWin.cpp | 2 +- libethcore/Miner.h | 10 ++++------ libethereum/Client.cpp | 5 +---- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/alethzero/MainWin.cpp b/alethzero/MainWin.cpp index 4f236b3e8..07f48c0bc 100644 --- a/alethzero/MainWin.cpp +++ b/alethzero/MainWin.cpp @@ -1353,7 +1353,7 @@ void Main::timerEvent(QTimerEvent*) auto ls = ethereum()->checkWatchSafe(i.first); if (ls.size()) { - cnote << "FIRING WATCH" << i.first << ls.size(); +// cnote << "FIRING WATCH" << i.first << ls.size(); i.second(ls); } } diff --git a/libethcore/Miner.h b/libethcore/Miner.h index 3a68491ff..cede34475 100644 --- a/libethcore/Miner.h +++ b/libethcore/Miner.h @@ -107,12 +107,10 @@ public: } if (!!_work) { - boost::timer t; - pause(); - cdebug << "pause took" << t.elapsed(); - t.restart(); - kickOff(); - cdebug << "kickOff took" << t.elapsed(); + DEV_TIMED_ABOVE(pause, 250) + pause(); + DEV_TIMED_ABOVE(kickOff, 250) + kickOff(); } else if (!_work && !!old) pause(); diff --git a/libethereum/Client.cpp b/libethereum/Client.cpp index 0fd27520d..f10eda55a 100644 --- a/libethereum/Client.cpp +++ b/libethereum/Client.cpp @@ -608,9 +608,6 @@ void Client::onChainChanged(ImportRoute const& _ir) bool Client::remoteActive() const { - cnote << chrono::duration_cast(chrono::system_clock::now().time_since_epoch()).count(); - cnote << chrono::duration_cast(m_lastGetWork.time_since_epoch()).count(); - cnote << chrono::duration_cast(chrono::system_clock::now() - m_lastGetWork).count(); return chrono::system_clock::now() - m_lastGetWork < chrono::seconds(30); } @@ -647,7 +644,7 @@ void Client::noteChanged(h256Hash const& _filters) { Guard l(x_filtersWatches); if (_filters.size()) - filtersStreamOut(cnote << "noteChanged:", _filters); + filtersStreamOut(cwatch << "noteChanged:", _filters); // accrue all changes left in each filter into the watches. for (auto& w: m_watches) if (_filters.count(w.second.id))