return Ok(None); } let array = outpoint.store(); let sat_ranges = self.list_inner(array)?; match sat_ranges { Some(sat_ranges) => Ok(Some(List::Unspent( sat_ranges .chunks_exact(11) .map(|chunk| SatRange::load(chunk.try_into().unwrap())) .collect(), ))), None => { if self.is_transaction_in_active_chain(outpoint.txid)? { Ok(Some(List::Spent)) } else { Ok(None) } } } } pub(crate) fn block_time(&self, height: Height) -> Result { let height = height.n(); match self.get_block_by_height(height)? { Some(block) => Ok(Blocktime::confirmed(block.header.time)), None => { let tx = self.database.begin_read()?; let current = tx .open_table(HEIGHT_TO_BLOCK_HASH)? .range(0..)? .next_back() .and_then(|result| result.ok()) .map(|(height, _hash)| height) .map(|x| x.value()) .unwrap_or(0);