Skip to content

Commit

Permalink
Rename rpc module into wallet_grpc
Browse files Browse the repository at this point in the history
Avoid any potential misunderstandings when the name is seen out of
context.
  • Loading branch information
jvff committed Apr 26, 2022
1 parent 25f0ac4 commit d5db500
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion zebrad/tests/common/lightwalletd.rs
Expand Up @@ -16,8 +16,8 @@ use zebrad::config::ZebradConfig;

use super::{config::default_test_config, launch::ZebradTestDirExt};

pub mod rpc;
pub mod send_transaction_test;
pub mod wallet_grpc;

/// The name of the env var that enables Zebra lightwalletd integration tests.
/// These tests need a `lightwalletd` binary in the test machine's path.
Expand Down
11 changes: 4 additions & 7 deletions zebrad/tests/common/lightwalletd/send_transaction_test.rs
Expand Up @@ -35,8 +35,7 @@ use crate::common::{
},
launch::spawn_zebrad_for_rpc_without_initial_peers,
lightwalletd::{
self,
rpc::{connect_to_lightwalletd, spawn_lightwalletd_with_rpc_server},
wallet_grpc::{self, connect_to_lightwalletd, spawn_lightwalletd_with_rpc_server},
zebra_skip_lightwalletd_tests, LIGHTWALLETD_TEST_TIMEOUT,
},
sync::perform_full_sync_starting_from,
Expand Down Expand Up @@ -79,7 +78,7 @@ pub async fn run() -> Result<()> {
let mut rpc_client = connect_to_lightwalletd(lightwalletd_rpc_port).await?;

for transaction in transactions {
let expected_response = lightwalletd::rpc::SendResponse {
let expected_response = wallet_grpc::SendResponse {
error_code: 0,
error_message: format!("\"{}\"", transaction.hash()),
};
Expand Down Expand Up @@ -212,12 +211,10 @@ where
}

/// Prepare a request to send to lightwalletd that contains a transaction to be sent.
fn prepare_send_transaction_request(
transaction: Arc<Transaction>,
) -> lightwalletd::rpc::RawTransaction {
fn prepare_send_transaction_request(transaction: Arc<Transaction>) -> wallet_grpc::RawTransaction {
let transaction_bytes = transaction.zcash_serialize_to_vec().unwrap();

lightwalletd::rpc::RawTransaction {
wallet_grpc::RawTransaction {
data: transaction_bytes,
height: -1,
}
Expand Down
Expand Up @@ -9,7 +9,7 @@ use zebra_test::{args, net::random_known_port, prelude::*};
use crate::{
common::{
config::testdir,
lightwalletd::{self, LightWalletdTestDirExt, LIGHTWALLETD_TEST_TIMEOUT},
lightwalletd::{LightWalletdTestDirExt, LIGHTWALLETD_TEST_TIMEOUT},
},
LIGHTWALLETD_FAILURE_MESSAGES, LIGHTWALLETD_IGNORE_MESSAGES, PROCESS_FAILURE_MESSAGES,
};
Expand All @@ -24,9 +24,7 @@ const LIGHTWALLETD_DATA_DIR_VAR: &str = "LIGHTWALLETD_DATA_DIR";

/// Type alias for the RPC client to communicate with a lightwalletd instance.
pub type LightwalletdRpcClient =
lightwalletd::rpc::compact_tx_streamer_client::CompactTxStreamerClient<
tonic::transport::Channel,
>;
compact_tx_streamer_client::CompactTxStreamerClient<tonic::transport::Channel>;

/// Start a lightwalletd instance with its RPC server functionality enabled.
///
Expand Down

0 comments on commit d5db500

Please sign in to comment.