zebrad: use new state API
This commit is contained in:
parent
a25801fc2c
commit
3133214e4f
|
@ -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))?
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue