MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / ExistsImpl

Method ExistsImpl

src/dbwrapper.cpp:336–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

334}
335
336bool CDBWrapper::ExistsImpl(std::span<const std::byte> key) const
337{
338 leveldb::Slice slKey(CharCast(key.data()), key.size());
339
340 std::string strValue;
341 leveldb::Status status = DBContext().pdb->Get(DBContext().readoptions, slKey, &strValue);
342 if (!status.ok()) {
343 if (status.IsNotFound())
344 return false;
345 LogError("LevelDB read failure: %s", status.ToString());
346 HandleError(status);
347 }
348 return true;
349}
350
351size_t CDBWrapper::EstimateSizeImpl(std::span<const std::byte> key1, std::span<const std::byte> key2) const
352{

Callers

nothing calls this directly

Calls 6

HandleErrorFunction · 0.85
CharCastFunction · 0.70
dataMethod · 0.45
sizeMethod · 0.45
GetMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected