zebrad: use new state API

This commit is contained in:
Henry de Valence 2020-09-09 21:19:15 -07:00
parent a25801fc2c
commit 3133214e4f
1 changed files with 3 additions and 5 deletions

View File

@ -312,12 +312,10 @@ where
.ready_and() .ready_and()
.await .await
.map_err(|e| eyre!(e))? .map_err(|e| eyre!(e))?
.call(zebra_state::Request::GetBlockLocator { .call(zebra_state::Request::BlockLocator)
genesis: self.genesis_hash,
})
.await .await
.map(|response| match response { .map(|response| match response {
zebra_state::Response::BlockLocator { block_locator } => block_locator, zebra_state::Response::BlockLocator(block_locator) => block_locator,
_ => unreachable!( _ => unreachable!(
"GetBlockLocator request can only result in Response::BlockLocator" "GetBlockLocator request can only result in Response::BlockLocator"
), ),
@ -654,7 +652,7 @@ where
.ready_and() .ready_and()
.await .await
.map_err(|e| eyre!(e))? .map_err(|e| eyre!(e))?
.call(zebra_state::Request::GetDepth { hash }) .call(zebra_state::Request::Depth(hash))
.await .await
.map_err(|e| eyre!(e))? .map_err(|e| eyre!(e))?
{ {