MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / Exists

Method Exists

src/persistence/leveldbwrapper.h:205–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203 }
204
205 bool Exists(const std::string &key) {
206 leveldb::Slice slKey(key);
207 string strValue;
208 leveldb::Status status = pdb->Get(readoptions, slKey, &strValue);
209 if (!status.ok()) {
210 if (status.IsNotFound())
211 return false;
212 LogPrint(BCLog::INFO,"LevelDB read failure: %s\n", status.ToString().c_str());
213 ThrowError(status);
214 }
215 return true;
216 }
217
218 bool Erase(const string& key, bool fSync = false) {
219 CLevelDBBatch batch;

Callers 3

AlreadyHaveFunction · 0.45
ProcessInvMessageFunction · 0.45
HasDataMethod · 0.45

Calls 5

ThrowErrorFunction · 0.85
IsNotFoundMethod · 0.80
GetMethod · 0.45
okMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected