diff --git a/teos-common/src/test_utils.rs b/teos-common/src/test_utils.rs index c59ec7d3..4bd5cb91 100644 --- a/teos-common/src/test_utils.rs +++ b/teos-common/src/test_utils.rs @@ -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::() % 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. diff --git a/teos/src/bitcoin_cli.rs b/teos/src/bitcoin_cli.rs index 41aaacbd..02970d98 100644 --- a/teos/src/bitcoin_cli.rs +++ b/teos/src/bitcoin_cli.rs @@ -131,8 +131,7 @@ impl<'a> BitcoindClient<'a> { /// Gets a fresh RPC client. pub fn get_new_rpc_client(&self) -> std::io::Result { 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)) } diff --git a/watchtower-plugin/src/retrier.rs b/watchtower-plugin/src/retrier.rs index d806bf97..7219a5dc 100644 --- a/watchtower-plugin/src/retrier.rs +++ b/watchtower-plugin/src/retrier.rs @@ -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();