Browse Source

add debug info for BlockQueueStatus

cl-refactor
CJentzsch 10 years ago
parent
commit
76868a89ed
  1. 12
      libethereum/BlockQueue.cpp
  2. 2
      libethereum/BlockQueue.h

12
libethereum/BlockQueue.cpp

@ -418,3 +418,15 @@ void BlockQueue::retryAllUnknown()
m_unknown.clear();
m_moreToVerify.notify_all();
}
std::ostream& dev::eth::operator<<(std::ostream& _out, BlockQueueStatus const& _bqs)
{
_out << "verified: " << _bqs.verified << endl;
_out << "verifying: " << _bqs.verifying << endl;
_out << "unverified: " << _bqs.unverified << endl;
_out << "future: " << _bqs.future << endl;
_out << "unknown: " << _bqs.unknown << endl;
_out << "bad: " << _bqs.bad << endl;
return _out;
}

2
libethereum/BlockQueue.h

@ -136,5 +136,7 @@ private:
bool m_deleting = false; ///< Exit condition for verifiers.
};
std::ostream& operator<<(std::ostream& _out, BlockQueueStatus const& _s);
}
}

Loading…
Cancel
Save