diff --git a/zebra-rpc/src/methods.rs b/zebra-rpc/src/methods.rs index 8df96047967..ef30a691a4b 100644 --- a/zebra-rpc/src/methods.rs +++ b/zebra-rpc/src/methods.rs @@ -117,8 +117,8 @@ pub struct RpcImpl where Mempool: Service, State: Service< - zebra_state::Request, - Response = zebra_state::Response, + zebra_state::ReadRequest, + Response = zebra_state::ReadResponse, Error = zebra_state::BoxError, >, Tip: ChainTip, @@ -144,8 +144,8 @@ impl RpcImpl where Mempool: Service, State: Service< - zebra_state::Request, - Response = zebra_state::Response, + zebra_state::ReadRequest, + Response = zebra_state::ReadResponse, Error = zebra_state::BoxError, >, Tip: ChainTip + Send + Sync, @@ -177,8 +177,8 @@ where tower::Service + 'static, Mempool::Future: Send, State: Service< - zebra_state::Request, - Response = zebra_state::Response, + zebra_state::ReadRequest, + Response = zebra_state::ReadResponse, Error = zebra_state::BoxError, > + Clone + Send @@ -264,7 +264,8 @@ where data: None, })?; - let request = zebra_state::Request::Block(zebra_state::HashOrHeight::Height(height)); + let request = + zebra_state::ReadRequest::Block(zebra_state::HashOrHeight::Height(height)); let response = state .ready() .and_then(|service| service.call(request)) @@ -276,8 +277,8 @@ where })?; match response { - zebra_state::Response::Block(Some(block)) => Ok(GetBlock(block.into())), - zebra_state::Response::Block(None) => Err(Error { + zebra_state::ReadResponse::Block(Some(block)) => Ok(GetBlock(block.into())), + zebra_state::ReadResponse::Block(None) => Err(Error { code: ErrorCode::ServerError(0), message: "Block not found".to_string(), data: None, diff --git a/zebra-rpc/src/server.rs b/zebra-rpc/src/server.rs index c97b42f3dea..523924cc5d4 100644 --- a/zebra-rpc/src/server.rs +++ b/zebra-rpc/src/server.rs @@ -44,8 +44,8 @@ impl RpcServer { + 'static, Mempool::Future: Send, State: Service< - zebra_state::Request, - Response = zebra_state::Response, + zebra_state::ReadRequest, + Response = zebra_state::ReadResponse, Error = zebra_state::BoxError, > + Clone + Send