MCPcopy Create free account
hub / github.com/LUX-Core/lux / insert

Method insert

src/cpp-ethereum/libdevcore/MemoryDB.cpp:85–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85void 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
103bool MemoryDB::kill(h256 const& _h)
104{

Callers 2

getMethod · 0.45
keysMethod · 0.45

Calls 3

findMethod · 0.45
endMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected