MCPcopy Create free account
hub / github.com/ElementsProject/elements / CreateFilter

Method CreateFilter

src/leveldb/db/dbformat.cc:102–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100const char* InternalFilterPolicy::Name() const { return user_policy_->Name(); }
101
102void InternalFilterPolicy::CreateFilter(const Slice* keys, int n,
103 std::string* dst) const {
104 // We rely on the fact that the code in table.cc does not mind us
105 // adjusting keys[].
106 Slice* mkey = const_cast<Slice*>(keys);
107 for (int i = 0; i < n; i++) {
108 mkey[i] = ExtractUserKey(keys[i]);
109 // TODO(sanjay): Suppress dups?
110 }
111 user_policy_->CreateFilter(keys, n, dst);
112}
113
114bool InternalFilterPolicy::KeyMayMatch(const Slice& key, const Slice& f) const {
115 return user_policy_->KeyMayMatch(ExtractUserKey(key), f);

Callers

nothing calls this directly

Calls 1

ExtractUserKeyFunction · 0.85

Tested by

no test coverage detected