mirror of
https://github.com/Cuprate/cuprate.git
synced 2025-01-24 11:36:10 +00:00
fix find_block
This commit is contained in:
parent
47fb1a2d4a
commit
19117bbef3
1 changed files with 8 additions and 6 deletions
|
@ -231,12 +231,14 @@ fn find_block(env: &ConcreteEnv, block_hash: BlockHash) -> ResponseResult {
|
|||
|
||||
let table_alt_block_heights = env_inner.open_db_ro::<AltBlockHeights>(&tx_ro)?;
|
||||
|
||||
let height = table_alt_block_heights.get(&block_hash)?;
|
||||
|
||||
Ok(BlockchainResponse::FindBlock(Some((
|
||||
match table_alt_block_heights.get(&block_hash) {
|
||||
Ok(height) => Ok(BlockchainResponse::FindBlock(Some((
|
||||
Chain::Alt(height.chain_id.into()),
|
||||
height.height,
|
||||
))))
|
||||
)))),
|
||||
Err(RuntimeError::KeyNotFound) => Ok(BlockchainResponse::FindBlock(None)),
|
||||
Err(e) => Err(e),
|
||||
}
|
||||
}
|
||||
|
||||
/// [`BlockchainReadRequest::FilterUnknownHashes`].
|
||||
|
|
Loading…
Reference in a new issue