24 #include <unordered_map> 38 #define dbdebug clog(DBChannel) 39 #define dbwarn clog(DBWarn) 51 void clear() { m_main.clear(); m_aux.clear(); }
52 std::unordered_map<h256, std::string>
get()
const;
54 std::string lookup(
h256 const& _h)
const;
55 bool exists(
h256 const& _h)
const;
57 bool kill(
h256 const& _h);
61 void removeAux(
h256 const& _h);
70 std::unordered_map<h256, std::pair<std::string, unsigned>>
m_main;
71 std::unordered_map<h256, std::pair<bytes, bool>>
m_aux;
73 mutable bool m_enforceRefs =
false;
89 for (
auto const& i: _m.
get())
91 _out << i.first <<
": ";
92 _out <<
RLP(i.second);
93 _out <<
" " <<
toHex(i.second);
std::unordered_map< h256, std::string > get() const
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
std::string toHex(T const &_data, int _w=2, HexPrefix _prefix=HexPrefix::DontAdd)
std::unordered_map< h256, std::pair< std::string, unsigned > > m_main
EnforceRefs(MemoryDB const &_o, bool _r)
static const int verbosity
std::vector< byte > bytes
std::ostream & operator<<(std::ostream &_out, bytes const &_e)
MemoryDB(MemoryDB const &_c)
boost::shared_mutex SharedMutex
The default logging channels.
std::unordered_set< h256 > h256Hash
static const char * name()
std::unordered_map< h256, std::pair< bytes, bool > > m_aux
Class for interpreting Recursive Linear-Prefix Data.