Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
Signed-off-by: dzdidi <[email protected]>
  • Loading branch information
dzdidi committed Feb 10, 2025
1 parent de4cf76 commit 9d49657
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion teos-common/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ pub fn generate_random_appointment(dispute_txid: Option<&Txid>) -> Appointment {
let mut penalty_tx: Transaction = consensus::deserialize(&tx_bytes).unwrap();
let size = get_random_int::<usize>() % 81;
let mut push_bytes_buf = PushBytesBuf::new();
PushBytesBuf::extend_from_slice(&mut push_bytes_buf, &cryptography::get_random_bytes(size)).unwrap();
PushBytesBuf::extend_from_slice(&mut push_bytes_buf, &cryptography::get_random_bytes(size))
.unwrap();
let script_pubkey = ScriptBuf::new_op_return(push_bytes_buf);

// Append a random-sized OP_RETURN to make each transcation random in size.
Expand Down
3 changes: 1 addition & 2 deletions teos/src/bitcoin_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ impl<'a> BitcoindClient<'a> {
/// Gets a fresh RPC client.
pub fn get_new_rpc_client(&self) -> std::io::Result<RpcClient> {
let http_endpoint = HttpEndpoint::for_host(self.host.to_owned()).with_port(self.port);
let rpc_credentials =
URL_SAFE.encode(format!("{}:{}", self.rpc_user, self.rpc_password));
let rpc_credentials = URL_SAFE.encode(format!("{}:{}", self.rpc_user, self.rpc_password));
Ok(RpcClient::new(&rpc_credentials, http_endpoint))
}

Expand Down
9 changes: 7 additions & 2 deletions watchtower-plugin/src/retrier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1236,11 +1236,16 @@ mod tests {
{
// After the retriers gives up, it should go idling and flag the tower as unreachable
tokio::time::sleep(Duration::from_secs_f64(
MAX_ELAPSED_TIME as f64 + MAX_RUN_TIME
MAX_ELAPSED_TIME as f64 + MAX_RUN_TIME,
))
.await;

wait_until!(wt_client.lock().unwrap().get_retrier_status(&tower_id).unwrap().is_idle());
wait_until!(wt_client
.lock()
.unwrap()
.get_retrier_status(&tower_id)
.unwrap()
.is_idle());

let state = wt_client.lock().unwrap();
let tower = state.towers.get(&tower_id).unwrap();
Expand Down

0 comments on commit 9d49657

Please sign in to comment.