| 136 | } |
| 137 | |
| 138 | void OverlayDB::kill(h256 const& _h) |
| 139 | { |
| 140 | #if ETH_PARANOIA || 1 |
| 141 | if (!MemoryDB::kill(_h)) |
| 142 | { |
| 143 | std::string ret; |
| 144 | if (m_db) |
| 145 | m_db->Get(m_readOptions, ldb::Slice((char const*)_h.data(), 32), &ret); |
| 146 | // No point node ref decreasing for EmptyTrie since we never bother incrementing it in the first place for |
| 147 | // empty storage tries. |
| 148 | if (ret.empty() && _h != EmptyTrie) |
| 149 | cnote << "Decreasing DB node ref count below zero with no DB node. Probably have a corrupt Trie." << _h; |
| 150 | |
| 151 | // TODO: for 1.1: ref-counted triedb. |
| 152 | } |
| 153 | #else |
| 154 | MemoryDB::kill(_h); |
| 155 | #endif |
| 156 | } |
| 157 | |
| 158 | bool OverlayDB::deepkill(h256 const& _h) |
| 159 | { |