Skip to content

Commit 65a05c4

Browse files
committed
rpc_api: Use test_common prefix.
1 parent bac92f3 commit 65a05c4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/client/rpc_api.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ impl RpcApi for Client {
199199
#[cfg(test)]
200200
mod tests {
201201
use super::*;
202-
use crate::test_common::*;
202+
use crate::test_common;
203203
use bitcoin::{hashes::Hash, Amount, OutPoint, ScriptBuf, TxIn, TxOut, Txid, Witness};
204204

205205
/// Tests `send_raw_transaction` and `get_raw_transaction`.
@@ -219,9 +219,9 @@ mod tests {
219219
};
220220
let txout = TxOut {
221221
value: Amount::from_sat(0x1F),
222-
script_pubkey: get_temp_address().script_pubkey(),
222+
script_pubkey: test_common::get_temp_address().script_pubkey(),
223223
};
224-
let inserted_tx1 = create_transaction(vec![txin], vec![txout]);
224+
let inserted_tx1 = test_common::create_transaction(vec![txin], vec![txout]);
225225
rpc.send_raw_transaction(&inserted_tx1).unwrap();
226226

227227
let txin = TxIn {
@@ -235,9 +235,9 @@ mod tests {
235235
};
236236
let txout = TxOut {
237237
value: Amount::from_sat(0x45),
238-
script_pubkey: get_temp_address().script_pubkey(),
238+
script_pubkey: test_common::get_temp_address().script_pubkey(),
239239
};
240-
let inserted_tx2 = create_transaction(vec![txin], vec![txout]);
240+
let inserted_tx2 = test_common::create_transaction(vec![txin], vec![txout]);
241241
rpc.send_raw_transaction(&inserted_tx2).unwrap();
242242

243243
// Retrieve inserted transactions from Bitcoin.
@@ -271,9 +271,9 @@ mod tests {
271271
};
272272
let txout = TxOut {
273273
value: Amount::from_sat(0x1F),
274-
script_pubkey: get_temp_address().script_pubkey(),
274+
script_pubkey: test_common::get_temp_address().script_pubkey(),
275275
};
276-
let inserted_tx = create_transaction(vec![txin], vec![txout]);
276+
let inserted_tx = test_common::create_transaction(vec![txin], vec![txout]);
277277
rpc.send_raw_transaction(&inserted_tx).unwrap();
278278

279279
let txid = inserted_tx.compute_txid();
@@ -287,7 +287,7 @@ mod tests {
287287
fn send_to_address() {
288288
let rpc = Client::new("", bitcoincore_rpc::Auth::None).unwrap();
289289

290-
let address = get_temp_address();
290+
let address = test_common::get_temp_address();
291291

292292
let txid = rpc
293293
.send_to_address(

0 commit comments

Comments
 (0)