@@ -19,13 +19,13 @@ use zcash_primitives::{
1919 transaction:: { Transaction , TxId } ,
2020} ;
2121
22- pub mod fetch;
22+ pub ( crate ) mod fetch;
2323
2424/// Fetch requests are created and sent to the [`crate::client::fetch::fetch`] task when a connection to the server is required.
2525///
2626/// Each variant includes a [`tokio::sync::oneshot::Sender`] for returning the fetched data to the requester.
2727#[ derive( Debug ) ]
28- pub enum FetchRequest {
28+ pub ( crate ) enum FetchRequest {
2929 /// Gets the height of the blockchain from the server.
3030 ChainTip ( oneshot:: Sender < BlockId > ) ,
3131 /// Gets the specified range of compact blocks from the server (end exclusive).
@@ -38,6 +38,7 @@ pub enum FetchRequest {
3838 /// Get a full transaction by txid.
3939 Transaction ( oneshot:: Sender < ( Transaction , BlockHeight ) > , TxId ) ,
4040 /// Get a list of unspent transparent output metadata for a given list of transparent addresses and start height.
41+ #[ allow( dead_code) ]
4142 UtxoMetadata (
4243 oneshot:: Sender < Vec < GetAddressUtxosReply > > ,
4344 ( Vec < String > , BlockHeight ) ,
@@ -59,7 +60,7 @@ pub enum FetchRequest {
5960/// Gets the height of the blockchain from the server.
6061///
6162/// Requires [`crate::client::fetch::fetch`] to be running concurrently, connected via the `fetch_request` channel.
62- pub async fn get_chain_height (
63+ pub ( crate ) async fn get_chain_height (
6364 fetch_request_sender : UnboundedSender < FetchRequest > ,
6465) -> Result < BlockHeight , ( ) > {
6566 let ( reply_sender, reply_receiver) = oneshot:: channel ( ) ;
@@ -74,7 +75,7 @@ pub async fn get_chain_height(
7475/// Gets the specified range of compact blocks from the server (end exclusive).
7576///
7677/// Requires [`crate::client::fetch::fetch`] to be running concurrently, connected via the `fetch_request` channel.
77- pub async fn get_compact_block_range (
78+ pub ( crate ) async fn get_compact_block_range (
7879 fetch_request_sender : UnboundedSender < FetchRequest > ,
7980 block_range : Range < BlockHeight > ,
8081) -> Result < tonic:: Streaming < CompactBlock > , ( ) > {
@@ -91,7 +92,7 @@ pub async fn get_compact_block_range(
9192/// from the server.
9293///
9394/// Requires [`crate::client::fetch::fetch`] to be running concurrently, connected via the `fetch_request` channel.
94- pub async fn get_subtree_roots (
95+ pub ( crate ) async fn get_subtree_roots (
9596 fetch_request_sender : UnboundedSender < FetchRequest > ,
9697 start_index : u32 ,
9798 shielded_protocol : i32 ,
@@ -118,7 +119,7 @@ pub async fn get_subtree_roots(
118119/// Gets the frontiers for a specified block height.
119120///
120121/// Requires [`crate::client::fetch::fetch`] to be running concurrently, connected via the `fetch_request` channel.
121- pub async fn get_frontiers (
122+ pub ( crate ) async fn get_frontiers (
122123 fetch_request_sender : UnboundedSender < FetchRequest > ,
123124 block_height : BlockHeight ,
124125) -> Result < ChainState , ( ) > {
@@ -135,7 +136,7 @@ pub async fn get_frontiers(
135136/// Gets a full transaction for a specified txid.
136137///
137138/// Requires [`crate::client::fetch::fetch`] to be running concurrently, connected via the `fetch_request` channel.
138- pub async fn get_transaction_and_block_height (
139+ pub ( crate ) async fn get_transaction_and_block_height (
139140 fetch_request_sender : UnboundedSender < FetchRequest > ,
140141 txid : TxId ,
141142) -> Result < ( Transaction , BlockHeight ) , ( ) > {
@@ -151,7 +152,8 @@ pub async fn get_transaction_and_block_height(
151152/// Gets unspent transparent output metadata for a list of `transparent addresses` from the specified `start_height`.
152153///
153154/// Requires [`crate::client::fetch::fetch`] to be running concurrently, connected via the `fetch_request` channel.
154- pub async fn get_utxo_metadata (
155+ #[ allow( dead_code) ]
156+ pub ( crate ) async fn get_utxo_metadata (
155157 fetch_request_sender : UnboundedSender < FetchRequest > ,
156158 transparent_addresses : Vec < String > ,
157159 start_height : BlockHeight ,
@@ -175,7 +177,7 @@ pub async fn get_utxo_metadata(
175177/// Gets transactions relevant to a given `transparent address` in the specified `block_range`.
176178///
177179/// Requires [`crate::client::fetch::fetch`] to be running concurrently, connected via the `fetch_request` channel.
178- pub async fn get_transparent_address_transactions (
180+ pub ( crate ) async fn get_transparent_address_transactions (
179181 fetch_request_sender : UnboundedSender < FetchRequest > ,
180182 transparent_address : String ,
181183 block_range : Range < BlockHeight > ,
@@ -193,7 +195,7 @@ pub async fn get_transparent_address_transactions(
193195}
194196
195197/// Gets stream of mempool transactions until the next block is mined.
196- pub async fn get_mempool_transaction_stream (
198+ pub ( crate ) async fn get_mempool_transaction_stream (
197199 client : & mut CompactTxStreamerClient < zingo_netutils:: UnderlyingService > ,
198200) -> Result < tonic:: Streaming < RawTransaction > , ( ) > {
199201 tracing:: debug!( "Fetching mempool stream" ) ;
0 commit comments