From 65a05c44bae3772c5d49de34440b81435c37f557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ceyhun=20=C5=9Een?= Date: Mon, 10 Jun 2024 16:58:45 +0300 Subject: [PATCH] rpc_api: Use test_common prefix. --- src/client/rpc_api.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/client/rpc_api.rs b/src/client/rpc_api.rs index a3fb2ea..6adc346 100644 --- a/src/client/rpc_api.rs +++ b/src/client/rpc_api.rs @@ -199,7 +199,7 @@ impl RpcApi for Client { #[cfg(test)] mod tests { use super::*; - use crate::test_common::*; + use crate::test_common; use bitcoin::{hashes::Hash, Amount, OutPoint, ScriptBuf, TxIn, TxOut, Txid, Witness}; /// Tests `send_raw_transaction` and `get_raw_transaction`. @@ -219,9 +219,9 @@ mod tests { }; let txout = TxOut { value: Amount::from_sat(0x1F), - script_pubkey: get_temp_address().script_pubkey(), + script_pubkey: test_common::get_temp_address().script_pubkey(), }; - let inserted_tx1 = create_transaction(vec![txin], vec![txout]); + let inserted_tx1 = test_common::create_transaction(vec![txin], vec![txout]); rpc.send_raw_transaction(&inserted_tx1).unwrap(); let txin = TxIn { @@ -235,9 +235,9 @@ mod tests { }; let txout = TxOut { value: Amount::from_sat(0x45), - script_pubkey: get_temp_address().script_pubkey(), + script_pubkey: test_common::get_temp_address().script_pubkey(), }; - let inserted_tx2 = create_transaction(vec![txin], vec![txout]); + let inserted_tx2 = test_common::create_transaction(vec![txin], vec![txout]); rpc.send_raw_transaction(&inserted_tx2).unwrap(); // Retrieve inserted transactions from Bitcoin. @@ -271,9 +271,9 @@ mod tests { }; let txout = TxOut { value: Amount::from_sat(0x1F), - script_pubkey: get_temp_address().script_pubkey(), + script_pubkey: test_common::get_temp_address().script_pubkey(), }; - let inserted_tx = create_transaction(vec![txin], vec![txout]); + let inserted_tx = test_common::create_transaction(vec![txin], vec![txout]); rpc.send_raw_transaction(&inserted_tx).unwrap(); let txid = inserted_tx.compute_txid(); @@ -287,7 +287,7 @@ mod tests { fn send_to_address() { let rpc = Client::new("", bitcoincore_rpc::Auth::None).unwrap(); - let address = get_temp_address(); + let address = test_common::get_temp_address(); let txid = rpc .send_to_address(