Skip to content

Commit

Permalink
rpc_api: Use test_common prefix.
Browse files Browse the repository at this point in the history
  • Loading branch information
ceyhunsen committed Jun 10, 2024
1 parent bac92f3 commit 65a05c4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/client/rpc_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand All @@ -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 {
Expand All @@ -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.
Expand Down Expand Up @@ -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();
Expand All @@ -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(
Expand Down

0 comments on commit 65a05c4

Please sign in to comment.