Skip to content

Commit

Permalink
Add TemplateProvider::rpc_url
Browse files Browse the repository at this point in the history
  • Loading branch information
jbesraa committed Jan 31, 2025
1 parent 1d4b5c4 commit a5a47e9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions roles/tests-integration/lib/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ pub async fn start_jdc(
(ret, jdc_address)
}

pub async fn start_jds(tp_address: SocketAddr) -> (JobDeclaratorServer, SocketAddr) {
pub async fn start_jds(tp_rpc_address: SocketAddr) -> (JobDeclaratorServer, SocketAddr) {
use jd_server::{CoinbaseOutput, Configuration, CoreRpc};
let authority_public_key = Secp256k1PublicKey::try_from(
"9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72".to_string(),
Expand All @@ -172,8 +172,8 @@ pub async fn start_jds(tp_address: SocketAddr) -> (JobDeclaratorServer, SocketAd
"036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075".to_string(),
)];
let core_rpc = CoreRpc::new(
tp_address.ip().to_string(),
tp_address.port(),
tp_rpc_address.ip().to_string(),
tp_rpc_address.port(),
"tp_username".to_string(),
"tp_password".to_string(),
);
Expand Down
5 changes: 5 additions & 0 deletions roles/tests-integration/lib/template_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::{
env,
fs::{create_dir_all, File},
io::{BufReader, Read},
net::SocketAddr,
path::{Path, PathBuf},
};
use tar::Archive;
Expand Down Expand Up @@ -178,4 +179,8 @@ impl TemplateProvider {
.generate_to_address(n as usize, &mining_address)
.expect("Failed to generate blocks");
}

pub fn rpc_url(&self) -> SocketAddr {
self.bitcoind.params.rpc_socket.into()
}
}

0 comments on commit a5a47e9

Please sign in to comment.