state: make Response::Tip return (height, hash)

This commit is contained in:
Henry de Valence 2020-09-09 22:05:47 -07:00
parent 3133214e4f
commit f1f0b331ac
2 changed files with 3 additions and 3 deletions

View File

@ -134,7 +134,7 @@ where
zs::Response::Tip(tip) => tip,
_ => unreachable!("wrong response to Request::Tip"),
};
let tip = if let Some(hash) = tip_hash {
let tip = if let Some((_height, hash)) = tip_hash {
match state_service
.ready_and()
.await

View File

@ -17,10 +17,10 @@ pub enum Response {
Committed(block::Hash),
/// Response to [`Request::Depth`] with the depth of the specified block.
Depth(Option<block::Height>),
Depth(Option<u32>),
/// Response to [`Request::Tip`] with the current best chain tip.
Tip(Option<block::Hash>),
Tip(Option<(block::Height, block::Hash)>),
/// Response to [`Request::BlockLocator`] with a block locator object.
BlockLocator(Vec<block::Hash>),