diff --git a/libethereum/BlockQueue.cpp b/libethereum/BlockQueue.cpp index c2bd35afc..013d8a000 100644 --- a/libethereum/BlockQueue.cpp +++ b/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; +} diff --git a/libethereum/BlockQueue.h b/libethereum/BlockQueue.h index d0437739d..45043559b 100644 --- a/libethereum/BlockQueue.h +++ b/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); + } }