Skip to content

Commit 4c80a18

Browse files
committed
ci: make cargo fmt happy
1 parent d065739 commit 4c80a18

File tree

7 files changed

+32
-36
lines changed

7 files changed

+32
-36
lines changed

crates/monitor/src/horizon_detection.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use indexer_query::horizon_detection::{self, HorizonDetectionQuery};
1111

1212
use crate::client::SubgraphClient;
1313

14-
1514
/// Detects if Horizon (V2) contracts are active in the network.
1615
///
1716
/// This function queries the network subgraph to check if any PaymentsEscrow accounts exist.
@@ -36,7 +35,10 @@ pub async fn is_horizon_active(network_subgraph: &SubgraphClient) -> Result<bool
3635
let account_count = response.payments_escrow_accounts.len();
3736

3837
if account_count > 0 {
39-
tracing::info!(accounts = account_count, "Horizon (V2) schema available - found existing PaymentsEscrow accounts");
38+
tracing::info!(
39+
accounts = account_count,
40+
"Horizon (V2) schema available - found existing PaymentsEscrow accounts"
41+
);
4042
} else {
4143
tracing::info!("Horizon (V2) schema available - no accounts found at startup, but will detect new accounts automatically");
4244
}

crates/service/src/middleware/auth.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ mod tests {
2727
use tower::{Service, ServiceBuilder, ServiceExt};
2828
use tower_http::auth::AsyncRequireAuthorizationLayer;
2929

30-
use crate::middleware::auth::tap::tap_receipt_authorize;
3130
use crate::{
32-
middleware::auth::{Bearer, OrExt},
31+
middleware::auth::{tap::tap_receipt_authorize, Bearer, OrExt},
3332
tap::{IndexerTapContext, TapReceipt},
3433
};
3534

crates/service/src/middleware/auth/tap.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,12 @@ mod tests {
188188
use tower::{Service, ServiceBuilder, ServiceExt};
189189
use tower_http::auth::AsyncRequireAuthorizationLayer;
190190

191+
use super::tap_receipt_authorize;
191192
use crate::{
192193
middleware::prometheus_metrics::{MetricLabelProvider, MetricLabels},
193194
tap::{CheckingReceipt, IndexerTapContext, TapReceipt},
194195
};
195196

196-
use super::tap_receipt_authorize;
197-
198197
#[fixture]
199198
fn metric() -> &'static prometheus::CounterVec {
200199
let registry = prometheus::Registry::new();

crates/tap-agent/src/agent/sender_accounts_manager.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,10 @@ async fn new_receipts_watcher(
11481148
.await
11491149
{
11501150
Ok(()) => {
1151-
tracing::debug!(event = "notification_handled", "Successfully handled notification");
1151+
tracing::debug!(
1152+
event = "notification_handled",
1153+
"Successfully handled notification"
1154+
);
11521155
}
11531156
Err(e) => {
11541157
tracing::error!(error = %e, "Error handling notification");

crates/tap-agent/src/tap/context.rs

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -125,18 +125,16 @@ impl NetworkVersion for Legacy {
125125
.collect::<Result<_, _>>()?;
126126
let rav_request = AggregatorRequestV1::new(valid_receipts, previous_rav);
127127

128-
let response =
129-
client
130-
.aggregate_receipts(rav_request)
131-
.await
132-
.inspect_err(|status: &Status| {
133-
if status.code() == Code::DeadlineExceeded {
134-
tracing::warn!(
135-
code = ?status.code(),
136-
"RAV request deadline exceeded; consider increasing request_timeout_secs"
137-
);
138-
}
139-
})?;
128+
let response = client.aggregate_receipts(rav_request).await.inspect_err(
129+
|status: &Status| {
130+
if status.code() == Code::DeadlineExceeded {
131+
tracing::warn!(
132+
code = ?status.code(),
133+
"RAV request deadline exceeded; consider increasing request_timeout_secs"
134+
);
135+
}
136+
},
137+
)?;
140138
response.into_inner().signed_rav()
141139
}
142140
}
@@ -168,18 +166,16 @@ impl NetworkVersion for Horizon {
168166
.collect::<Result<_, _>>()?;
169167
let rav_request = AggregatorRequestV2::new(valid_receipts, previous_rav);
170168

171-
let response =
172-
client
173-
.aggregate_receipts(rav_request)
174-
.await
175-
.inspect_err(|status: &Status| {
176-
if status.code() == Code::DeadlineExceeded {
177-
tracing::warn!(
178-
code = ?status.code(),
179-
"RAV request deadline exceeded; consider increasing request_timeout_secs"
180-
);
181-
}
182-
})?;
169+
let response = client.aggregate_receipts(rav_request).await.inspect_err(
170+
|status: &Status| {
171+
if status.code() == Code::DeadlineExceeded {
172+
tracing::warn!(
173+
code = ?status.code(),
174+
"RAV request deadline exceeded; consider increasing request_timeout_secs"
175+
);
176+
}
177+
},
178+
)?;
183179
response.into_inner().signed_rav()
184180
}
185181
}

crates/tap-agent/src/tap/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub async fn signers_trimmed(
2424
sender: Address,
2525
) -> Result<Vec<String>, anyhow::Error> {
2626
let escrow_accounts = escrow_accounts_rx.borrow();
27-
27+
2828
tracing::info!(sender = %sender, "signers_trimmed called");
2929

3030
let signers = escrow_accounts

crates/tap-agent/src/tracker/generic_tracker.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,7 @@ where
7979
#[tracing::instrument(skip(self), ret, level = "trace")]
8080
pub fn get_heaviest_allocation_id(&mut self) -> Option<Address> {
8181
let total_allocations = self.id_to_fee.len();
82-
tracing::debug!(
83-
total_allocations,
84-
"Evaluating allocations for RAV request",
85-
);
82+
tracing::debug!(total_allocations, "Evaluating allocations for RAV request",);
8683

8784
if total_allocations == 0 {
8885
tracing::warn!("No allocations found in fee tracker");

0 commit comments

Comments
 (0)