penumbra_sdk_mock_tendermint_proxy/
stub.rs1use {
2 penumbra_sdk_proto::util::tendermint_proxy::v1::{
3 tendermint_proxy_service_server::TendermintProxyService, AbciQueryRequest,
4 AbciQueryResponse, BroadcastTxAsyncRequest, BroadcastTxAsyncResponse,
5 BroadcastTxSyncRequest, BroadcastTxSyncResponse, GetBlockByHeightRequest,
6 GetBlockByHeightResponse, GetStatusRequest, GetStatusResponse, GetTxRequest, GetTxResponse,
7 },
8 tonic::Status,
9 tracing::instrument,
10};
11
12pub struct StubProxy;
17
18#[tonic::async_trait]
19impl TendermintProxyService for StubProxy {
20 async fn get_tx(
21 &self,
22 _req: tonic::Request<GetTxRequest>,
23 ) -> Result<tonic::Response<GetTxResponse>, Status> {
24 Err(Status::unimplemented("get_tx"))
25 }
26
27 #[instrument(
29 level = "info",
30 skip_all,
31 fields(req_id = tracing::field::Empty),
32 )]
33 async fn broadcast_tx_async(
34 &self,
35 _req: tonic::Request<BroadcastTxAsyncRequest>,
36 ) -> Result<tonic::Response<BroadcastTxAsyncResponse>, Status> {
37 Err(Status::unimplemented("broadcast_tx_async"))
38 }
39
40 #[instrument(
42 level = "info",
43 skip_all,
44 fields(req_id = tracing::field::Empty),
45 )]
46 async fn broadcast_tx_sync(
47 &self,
48 _req: tonic::Request<BroadcastTxSyncRequest>,
49 ) -> Result<tonic::Response<BroadcastTxSyncResponse>, Status> {
50 Err(Status::unimplemented("broadcast_tx_sync"))
51 }
52
53 #[instrument(level = "info", skip_all)]
55 async fn get_status(
56 &self,
57 __req: tonic::Request<GetStatusRequest>,
58 ) -> Result<tonic::Response<GetStatusResponse>, Status> {
59 Err(Status::unimplemented("get_status"))
60 }
61
62 #[instrument(level = "info", skip_all)]
63 async fn abci_query(
64 &self,
65 _req: tonic::Request<AbciQueryRequest>,
66 ) -> Result<tonic::Response<AbciQueryResponse>, Status> {
67 Err(Status::unimplemented("abci_query"))
68 }
69
70 #[instrument(level = "info", skip_all)]
71 async fn get_block_by_height(
72 &self,
73 _req: tonic::Request<GetBlockByHeightRequest>,
74 ) -> Result<tonic::Response<GetBlockByHeightResponse>, Status> {
75 Err(Status::unimplemented("get_block_by_height"))
76 }
77}