diff --git a/alethzero/MainWin.cpp b/alethzero/MainWin.cpp index 67f50da3e..0703a44a6 100644 --- a/alethzero/MainWin.cpp +++ b/alethzero/MainWin.cpp @@ -462,7 +462,7 @@ QString Main::lookup(QString const& _a) const void Main::on_about_triggered() { - QMessageBox::about(this, "About AlethZero PoC-" + QString(dev::Version).section('.', 1, 1), QString("AlethZero/v") + dev::Version + "/" DEV_QUOTED(ETH_BUILD_TYPE) "/" DEV_QUOTED(ETH_BUILD_PLATFORM) "\n" DEV_QUOTED(ETH_COMMIT_HASH) + (ETH_CLEAN_REPO ? "\nCLEAN" : "\n+ LOCAL CHANGES") + "\n\nBy Gav Wood, 2014.\nThis software wouldn't be where it is today without the many leaders & contributors including:\n\nVitalik Buterin, Tim Hughes, caktux, Nick Savers, Eric Lombrozo, Marko Simovic, the many testers and the Berlin DEV team."); + QMessageBox::about(this, "About AlethZero PoC-" + QString(dev::Version).section('.', 1, 1), QString("AlethZero/v") + dev::Version + "/" DEV_QUOTED(ETH_BUILD_TYPE) "/" DEV_QUOTED(ETH_BUILD_PLATFORM) "\n" DEV_QUOTED(ETH_COMMIT_HASH) + (ETH_CLEAN_REPO ? "\nCLEAN" : "\n+ LOCAL CHANGES") + "\n\nBy Gav Wood, 2014.\nThis software wouldn't be where it is today without the many leaders & contributors including:\n\nVitalik Buterin, Tim Hughes, caktux, Nick Savers, Eric Lombrozo, Marko Simovic, the many testers and the Berlin \304\220\316\236V team."); } void Main::on_paranoia_triggered() diff --git a/libdevcore/RangeMask.h b/libdevcore/RangeMask.h index f1b0043ff..e6a66776c 100644 --- a/libdevcore/RangeMask.h +++ b/libdevcore/RangeMask.h @@ -43,7 +43,7 @@ public: using Range = std::pair; using Ranges = std::vector; - RangeMask() {} + RangeMask(): m_all(0, 0) {} RangeMask(T _begin, T _end): m_all(_begin, _end) {} RangeMask(Range const& _c): m_all(_c) {} @@ -150,7 +150,7 @@ public: bool full() const { - return m_ranges.size() == 1 && m_ranges.begin()->first == m_all.first && m_ranges.begin()->second == m_all.second; + return m_all.first == m_all.second || (m_ranges.size() == 1 && m_ranges.begin()->first == m_all.first && m_ranges.begin()->second == m_all.second); } void clear() @@ -158,6 +158,12 @@ public: m_ranges.clear(); } + void reset() + { + m_ranges.clear(); + m_all = std::make_pair(0, 0); + } + std::pair const& all() const { return m_all; } class const_iterator diff --git a/libethereum/DownloadMan.h b/libethereum/DownloadMan.h index 3b88040fd..bf4a7db7f 100644 --- a/libethereum/DownloadMan.h +++ b/libethereum/DownloadMan.h @@ -63,8 +63,8 @@ private: Guard l(m_fetch); m_remaining.clear(); m_indices.clear(); - m_asked.clear(); - m_attempted.clear(); + m_asked.reset(); + m_attempted.reset(); } DownloadMan* m_man = nullptr; @@ -109,7 +109,7 @@ public: i->resetFetch(); } m_chain.clear(); - m_blocksGot.clear(); + m_blocksGot.reset(); } RangeMask taken(bool _desperate = false) const diff --git a/third/MainWin.cpp b/third/MainWin.cpp index 280fe7ba0..10f07ef6a 100644 --- a/third/MainWin.cpp +++ b/third/MainWin.cpp @@ -347,7 +347,7 @@ QString Main::lookup(QString const& _a) const void Main::on_about_triggered() { - QMessageBox::about(this, "About Third PoC-" + QString(dev::Version).section('.', 1, 1), QString("Third/v") + dev::Version + "/" DEV_QUOTED(ETH_BUILD_TYPE) "/" DEV_QUOTED(ETH_BUILD_PLATFORM) "\n" DEV_QUOTED(ETH_COMMIT_HASH) + (ETH_CLEAN_REPO ? "\nCLEAN" : "\n+ LOCAL CHANGES") + "\n\nBy Gav Wood, 2014.\nThis software wouldn't be where it is today without the many leaders & contributors including:\n\nVitalik Buterin, Tim Hughes, caktux, Nick Savers, Eric Lombrozo, Marko Simovic, the many testers and the Berlin DEV team."); + QMessageBox::about(this, "About Third PoC-" + QString(dev::Version).section('.', 1, 1), QString("Third/v") + dev::Version + "/" DEV_QUOTED(ETH_BUILD_TYPE) "/" DEV_QUOTED(ETH_BUILD_PLATFORM) "\n" DEV_QUOTED(ETH_COMMIT_HASH) + (ETH_CLEAN_REPO ? "\nCLEAN" : "\n+ LOCAL CHANGES") + "\n\nBy Gav Wood, 2014.\nThis software wouldn't be where it is today without the many leaders & contributors including:\n\nVitalik Buterin, Tim Hughes, caktux, Nick Savers, Eric Lombrozo, Marko Simovic, the many testers and the Berlin \304\220\316\236V team."); } void Main::writeSettings()