| 83 | } |
| 84 | |
| 85 | void MemoryDB::insert(h256 const& _h, bytesConstRef _v) |
| 86 | { |
| 87 | #if DEV_GUARDED_DB |
| 88 | WriteGuard l(x_this); |
| 89 | #endif |
| 90 | auto it = m_main.find(_h); |
| 91 | if (it != m_main.end()) |
| 92 | { |
| 93 | it->second.first = _v.toString(); |
| 94 | it->second.second++; |
| 95 | } |
| 96 | else |
| 97 | m_main[_h] = make_pair(_v.toString(), 1); |
| 98 | #if ETH_PARANOIA |
| 99 | dbdebug << "INST" << _h << "=>" << m_main[_h].second; |
| 100 | #endif |
| 101 | } |
| 102 | |
| 103 | bool MemoryDB::kill(h256 const& _h) |
| 104 | { |