Browse Source

Merge pull request #2313 from LefterisJP/blockchain_remove_legacy_code

Remove legacy code in blockchain.cpp
cl-refactor
Gav Wood 9 years ago
parent
commit
7695f61acc
  1. 6
      libdevcore/CommonData.h
  2. 10
      libethereum/BlockChain.cpp

6
libdevcore/CommonData.h

@ -334,4 +334,10 @@ std::vector<T> keysOf(std::unordered_map<T, U> const& _m)
return ret;
}
template <class T, class V>
bool contains(T const& _t, V const& _v)
{
return std::end(_t) != std::find(std::begin(_t), std::end(_t), _v);
}
}

10
libethereum/BlockChain.cpp

@ -24,6 +24,7 @@
#if ETH_PROFILING_GPERF
#include <gperftools/profiler.h>
#endif
#include <boost/timer.hpp>
#include <boost/filesystem.hpp>
#include <test/JsonSpiritHeaders.h>
@ -291,15 +292,6 @@ void BlockChain::rebuild(std::string const& _path, std::function<void(unsigned,
boost::filesystem::remove_all(path + "/details.old");
}
template <class T, class V>
bool contains(T const& _t, V const& _v)
{
for (auto const& i: _t)
if (i == _v)
return true;
return false;
}
LastHashes BlockChain::lastHashes(unsigned _n) const
{
Guard l(x_lastLastHashes);

Loading…
Cancel
Save