Browse Source

Tidy up notifications.

cl-refactor
Gav Wood 10 years ago
parent
commit
cfb9bd15b0
  1. 2
      alethzero/MainWin.cpp
  2. 10
      libethcore/Miner.h
  3. 5
      libethereum/Client.cpp

2
alethzero/MainWin.cpp

@ -1353,7 +1353,7 @@ void Main::timerEvent(QTimerEvent*)
auto ls = ethereum()->checkWatchSafe(i.first); auto ls = ethereum()->checkWatchSafe(i.first);
if (ls.size()) if (ls.size())
{ {
cnote << "FIRING WATCH" << i.first << ls.size(); // cnote << "FIRING WATCH" << i.first << ls.size();
i.second(ls); i.second(ls);
} }
} }

10
libethcore/Miner.h

@ -107,12 +107,10 @@ public:
} }
if (!!_work) if (!!_work)
{ {
boost::timer t; DEV_TIMED_ABOVE(pause, 250)
pause(); pause();
cdebug << "pause took" << t.elapsed(); DEV_TIMED_ABOVE(kickOff, 250)
t.restart(); kickOff();
kickOff();
cdebug << "kickOff took" << t.elapsed();
} }
else if (!_work && !!old) else if (!_work && !!old)
pause(); pause();

5
libethereum/Client.cpp

@ -608,9 +608,6 @@ void Client::onChainChanged(ImportRoute const& _ir)
bool Client::remoteActive() const bool Client::remoteActive() const
{ {
cnote << chrono::duration_cast<chrono::seconds>(chrono::system_clock::now().time_since_epoch()).count();
cnote << chrono::duration_cast<chrono::seconds>(m_lastGetWork.time_since_epoch()).count();
cnote << chrono::duration_cast<chrono::seconds>(chrono::system_clock::now() - m_lastGetWork).count();
return chrono::system_clock::now() - m_lastGetWork < chrono::seconds(30); return chrono::system_clock::now() - m_lastGetWork < chrono::seconds(30);
} }
@ -647,7 +644,7 @@ void Client::noteChanged(h256Hash const& _filters)
{ {
Guard l(x_filtersWatches); Guard l(x_filtersWatches);
if (_filters.size()) if (_filters.size())
filtersStreamOut(cnote << "noteChanged:", _filters); filtersStreamOut(cwatch << "noteChanged:", _filters);
// accrue all changes left in each filter into the watches. // accrue all changes left in each filter into the watches.
for (auto& w: m_watches) for (auto& w: m_watches)
if (_filters.count(w.second.id)) if (_filters.count(w.second.id))

Loading…
Cancel
Save