gears
gears copied to clipboard
[DISCUSSION]: Replace panic from RocksDB
Original comment:
fn get(&self, key: &[u8]) -> Option<Vec<u8>> {
self.db
.get(key)
.unwrap_or_else(|e| panic!("unrecoverable database error {}", e)) //TODO: this is probably
// not the right thing to do when handling a abci or REST query. Perhaps we should have a must_get method?
}
We need to re-think is it correct to panic if no value found in db