From 2522bb8836a55dcd44fa7056f63566261eb70b39 Mon Sep 17 00:00:00 2001
From: "hinto.janai" <hinto.janai@protonmail.com>
Date: Fri, 11 Oct 2024 18:06:18 -0400
Subject: [PATCH] binaries/cuprated/src/rpc/request: `pub(super)` ->
 `pub(crate)`

---
 .../cuprated/src/rpc/request/address_book.rs     | 10 +++++-----
 .../src/rpc/request/blockchain_context.rs        |  7 +++----
 .../src/rpc/request/blockchain_manager.rs        | 16 ++++++++--------
 binaries/cuprated/src/rpc/request/txpool.rs      |  6 +++---
 4 files changed, 19 insertions(+), 20 deletions(-)

diff --git a/binaries/cuprated/src/rpc/request/address_book.rs b/binaries/cuprated/src/rpc/request/address_book.rs
index 2aa58e84..9a16c0fd 100644
--- a/binaries/cuprated/src/rpc/request/address_book.rs
+++ b/binaries/cuprated/src/rpc/request/address_book.rs
@@ -12,7 +12,7 @@ use cuprate_p2p_core::{
 };
 
 /// [`AddressBookRequest::PeerlistSize`]
-pub(super) async fn peerlist_size<Z: NetworkZone>(
+pub(crate) async fn peerlist_size<Z: NetworkZone>(
     address_book: &mut impl AddressBook<Z>,
 ) -> Result<(u64, u64), Error> {
     let AddressBookResponse::PeerlistSize { white, grey } = address_book
@@ -30,7 +30,7 @@ pub(super) async fn peerlist_size<Z: NetworkZone>(
 }
 
 /// [`AddressBookRequest::ConnectionCount`]
-pub(super) async fn connection_count<Z: NetworkZone>(
+pub(crate) async fn connection_count<Z: NetworkZone>(
     address_book: &mut impl AddressBook<Z>,
 ) -> Result<(u64, u64), Error> {
     let AddressBookResponse::ConnectionCount { incoming, outgoing } = address_book
@@ -48,7 +48,7 @@ pub(super) async fn connection_count<Z: NetworkZone>(
 }
 
 /// [`AddressBookRequest::SetBan`]
-pub(super) async fn set_ban<Z: NetworkZone>(
+pub(crate) async fn set_ban<Z: NetworkZone>(
     address_book: &mut impl AddressBook<Z>,
     peer: cuprate_p2p_core::ban::SetBan<Z::Addr>,
 ) -> Result<(), Error> {
@@ -67,7 +67,7 @@ pub(super) async fn set_ban<Z: NetworkZone>(
 }
 
 /// [`AddressBookRequest::GetBan`]
-pub(super) async fn get_ban<Z: NetworkZone>(
+pub(crate) async fn get_ban<Z: NetworkZone>(
     address_book: &mut impl AddressBook<Z>,
     peer: Z::Addr,
 ) -> Result<Option<std::time::Instant>, Error> {
@@ -86,7 +86,7 @@ pub(super) async fn get_ban<Z: NetworkZone>(
 }
 
 /// [`AddressBookRequest::GetBans`]
-pub(super) async fn get_bans<Z: NetworkZone>(
+pub(crate) async fn get_bans<Z: NetworkZone>(
     address_book: &mut impl AddressBook<Z>,
 ) -> Result<(), Error> {
     let AddressBookResponse::GetBans(bans) = address_book
diff --git a/binaries/cuprated/src/rpc/request/blockchain_context.rs b/binaries/cuprated/src/rpc/request/blockchain_context.rs
index b616593d..e0fa67b2 100644
--- a/binaries/cuprated/src/rpc/request/blockchain_context.rs
+++ b/binaries/cuprated/src/rpc/request/blockchain_context.rs
@@ -12,9 +12,8 @@ use cuprate_consensus::context::{
 use cuprate_types::{FeeEstimate, HardFork, HardForkInfo};
 
 /// [`BlockChainContextRequest::Context`].
-pub(super) async fn context(
+pub(crate) async fn context(
     service: &mut BlockChainContextService,
-    height: u64,
 ) -> Result<BlockChainContext, Error> {
     let BlockChainContextResponse::Context(context) = service
         .ready()
@@ -31,7 +30,7 @@ pub(super) async fn context(
 }
 
 /// [`BlockChainContextRequest::HardForkInfo`].
-pub(super) async fn hard_fork_info(
+pub(crate) async fn hard_fork_info(
     service: &mut BlockChainContextService,
     hard_fork: HardFork,
 ) -> Result<HardForkInfo, Error> {
@@ -50,7 +49,7 @@ pub(super) async fn hard_fork_info(
 }
 
 /// [`BlockChainContextRequest::FeeEstimate`].
-pub(super) async fn fee_estimate(
+pub(crate) async fn fee_estimate(
     service: &mut BlockChainContextService,
     grace_blocks: u64,
 ) -> Result<FeeEstimate, Error> {
diff --git a/binaries/cuprated/src/rpc/request/blockchain_manager.rs b/binaries/cuprated/src/rpc/request/blockchain_manager.rs
index 4dc91c82..569c7e14 100644
--- a/binaries/cuprated/src/rpc/request/blockchain_manager.rs
+++ b/binaries/cuprated/src/rpc/request/blockchain_manager.rs
@@ -11,7 +11,7 @@ use crate::rpc::handler::{
 };
 
 /// [`BlockchainManagerRequest::PopBlocks`]
-pub(super) async fn pop_blocks(
+pub(crate) async fn pop_blocks(
     blockchain_manager: &mut BlockchainManagerHandle,
     amount: u64,
 ) -> Result<u64, Error> {
@@ -30,7 +30,7 @@ pub(super) async fn pop_blocks(
 }
 
 /// [`BlockchainManagerRequest::Prune`]
-pub(super) async fn prune(blockchain_manager: &mut BlockchainManagerHandle) -> Result<(), Error> {
+pub(crate) async fn prune(blockchain_manager: &mut BlockchainManagerHandle) -> Result<(), Error> {
     let BlockchainManagerResponse::Ok = blockchain_manager
         .ready()
         .await?
@@ -44,7 +44,7 @@ pub(super) async fn prune(blockchain_manager: &mut BlockchainManagerHandle) -> R
 }
 
 /// [`BlockchainManagerRequest::Pruned`]
-pub(super) async fn pruned(
+pub(crate) async fn pruned(
     blockchain_manager: &mut BlockchainManagerHandle,
 ) -> Result<bool, Error> {
     let BlockchainManagerResponse::Pruned(pruned) = blockchain_manager
@@ -60,7 +60,7 @@ pub(super) async fn pruned(
 }
 
 /// [`BlockchainManagerRequest::RelayBlock`]
-pub(super) async fn relay_block(
+pub(crate) async fn relay_block(
     blockchain_manager: &mut BlockchainManagerHandle,
     block: Block,
 ) -> Result<(), Error> {
@@ -77,7 +77,7 @@ pub(super) async fn relay_block(
 }
 
 /// [`BlockchainManagerRequest::Syncing`]
-pub(super) async fn syncing(
+pub(crate) async fn syncing(
     blockchain_manager: &mut BlockchainManagerHandle,
 ) -> Result<bool, Error> {
     let BlockchainManagerResponse::Syncing(syncing) = blockchain_manager
@@ -93,7 +93,7 @@ pub(super) async fn syncing(
 }
 
 /// [`BlockchainManagerRequest::Synced`]
-pub(super) async fn synced(
+pub(crate) async fn synced(
     blockchain_manager: &mut BlockchainManagerHandle,
 ) -> Result<bool, Error> {
     let BlockchainManagerResponse::Synced(syncing) = blockchain_manager
@@ -109,7 +109,7 @@ pub(super) async fn synced(
 }
 
 /// [`BlockchainManagerRequest::Target`]
-pub(super) async fn target(
+pub(crate) async fn target(
     blockchain_manager: &mut BlockchainManagerHandle,
 ) -> Result<std::time::Duration, Error> {
     let BlockchainManagerResponse::Target(target) = blockchain_manager
@@ -125,7 +125,7 @@ pub(super) async fn target(
 }
 
 /// [`BlockchainManagerRequest::TargetHeight`]
-pub(super) async fn target_height(
+pub(crate) async fn target_height(
     blockchain_manager: &mut BlockchainManagerHandle,
 ) -> Result<u64, Error> {
     let BlockchainManagerResponse::TargetHeight { height } = blockchain_manager
diff --git a/binaries/cuprated/src/rpc/request/txpool.rs b/binaries/cuprated/src/rpc/request/txpool.rs
index a36778eb..dca439ba 100644
--- a/binaries/cuprated/src/rpc/request/txpool.rs
+++ b/binaries/cuprated/src/rpc/request/txpool.rs
@@ -15,7 +15,7 @@ use cuprate_txpool::{
 };
 
 /// [`TxpoolReadRequest::Backlog`]
-pub(super) async fn backlog(txpool_read: &mut TxpoolReadHandle) -> Result<Vec<TxEntry>, Error> {
+pub(crate) async fn backlog(txpool_read: &mut TxpoolReadHandle) -> Result<Vec<TxEntry>, Error> {
     let TxpoolReadResponse::Backlog(tx_entries) = txpool_read
         .ready()
         .await
@@ -31,7 +31,7 @@ pub(super) async fn backlog(txpool_read: &mut TxpoolReadHandle) -> Result<Vec<Tx
 }
 
 /// [`TxpoolReadRequest::Size`]
-pub(super) async fn size(txpool_read: &mut TxpoolReadHandle) -> Result<u64, Error> {
+pub(crate) async fn size(txpool_read: &mut TxpoolReadHandle) -> Result<u64, Error> {
     let TxpoolReadResponse::Size(size) = txpool_read
         .ready()
         .await
@@ -48,7 +48,7 @@ pub(super) async fn size(txpool_read: &mut TxpoolReadHandle) -> Result<u64, Erro
 
 /// TODO
 #[expect(clippy::needless_pass_by_ref_mut, reason = "TODO: remove after impl")]
-pub(super) async fn flush(
+pub(crate) async fn flush(
     txpool_read: &mut TxpoolReadHandle,
     tx_hashes: Vec<[u8; 32]>,
 ) -> Result<(), Error> {