in common/rusty_leveldb_sgx/src/table_reader.rs [307:331]
fn prev(&mut self) -> bool {
// happy path: current block contains previous entry
if let Some(ref mut cb) = self.current_block {
if cb.prev() {
return true;
}
}
// Go back one block and look for the last entry in the previous block
if self.index_block.prev() {
if let Some((_, handle)) = current_key_val(&self.index_block) {
if self.load_block(&handle).is_ok() {
self.current_block.as_mut().unwrap().seek_to_last();
self.current_block.as_ref().unwrap().valid()
} else {
self.reset();
false
}
} else {
false
}
} else {
false
}
}