Browse Source

Tidy up notifications.

cl-refactor
Gav Wood 10 years ago
parent
commit
cfb9bd15b0
  1. 2
      alethzero/MainWin.cpp
  2. 6
      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);
if (ls.size())
{
cnote << "FIRING WATCH" << i.first << ls.size();
// cnote << "FIRING WATCH" << i.first << ls.size();
i.second(ls);
}
}

6
libethcore/Miner.h

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

5
libethereum/Client.cpp

@ -608,9 +608,6 @@ void Client::onChainChanged(ImportRoute const& _ir)
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);
}
@ -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))

Loading…
Cancel
Save