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

Method InitDataBlock

src/leveldb/table/two_level_iterator.cc:146–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146void TwoLevelIterator::InitDataBlock() {
147 if (!index_iter_.Valid()) {
148 SetDataIterator(nullptr);
149 } else {
150 Slice handle = index_iter_.value();
151 if (data_iter_.iter() != nullptr &&
152 handle.compare(data_block_handle_) == 0) {
153 // data_iter_ is already constructed with this iterator, so
154 // no need to change anything
155 } else {
156 Iterator* iter = (*block_function_)(arg_, options_, handle);
157 data_block_handle_.assign(handle.data(), handle.size());
158 SetDataIterator(iter);
159 }
160 }
161}
162
163} // namespace
164

Callers

nothing calls this directly

Calls 7

iterMethod · 0.80
compareMethod · 0.80
ValidMethod · 0.45
valueMethod · 0.45
assignMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected