Skip to content

Commit f9d9945

Browse files
committed
clippy errors
1 parent f6f4141 commit f9d9945

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

src/cli/wormhole.rs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -748,10 +748,12 @@ pub async fn handle_wormhole_command(
748748
Ok(())
749749
},
750750
WormholeCommands::Aggregate { proofs, output } => aggregate_proofs(proofs, output).await,
751-
WormholeCommands::VerifyAggregated { proof } =>
752-
verify_aggregated_proof(proof, node_url).await,
753-
WormholeCommands::ParseProof { proof, aggregated, verify } =>
754-
parse_proof_file(proof, aggregated, verify).await,
751+
WormholeCommands::VerifyAggregated { proof } => {
752+
verify_aggregated_proof(proof, node_url).await
753+
},
754+
WormholeCommands::ParseProof { proof, aggregated, verify } => {
755+
parse_proof_file(proof, aggregated, verify).await
756+
},
755757
WormholeCommands::Multiround {
756758
num_proofs,
757759
rounds,
@@ -2402,8 +2404,6 @@ struct DissolveOutput {
24022404
secret: [u8; 32],
24032405
/// Amount in planck
24042406
amount: u128,
2405-
/// Block hash where the transfer was recorded
2406-
block_hash: subxt::utils::H256,
24072407
/// Transfer count from the NativeTransferred event
24082408
transfer_count: u64,
24092409
/// Funding account (sender)
@@ -2534,7 +2534,6 @@ async fn run_dissolve(
25342534
address: wormhole_address,
25352535
secret: initial_secret.secret,
25362536
amount,
2537-
block_hash,
25382537
transfer_count: event.transfer_count,
25392538
funding_account: funding_account.clone(),
25402539
}];
@@ -2575,7 +2574,7 @@ async fn run_dissolve(
25752574
// Process inputs in batches of ≤16 (aggregation batch size)
25762575
let batch_size = agg_config.num_leaf_proofs;
25772576
let mut all_next_outputs: Vec<DissolveOutput> = Vec::new();
2578-
let num_batches = (num_inputs + batch_size - 1) / batch_size;
2577+
let num_batches = num_inputs.div_ceil(batch_size);
25792578

25802579
for batch_idx in 0..num_batches {
25812580
let batch_start = batch_idx * batch_size;
@@ -2667,7 +2666,6 @@ async fn run_dissolve(
26672666
address: SubxtAccountId(target_address.address),
26682667
secret: target_address.secret,
26692668
amount: event.amount,
2670-
block_hash: verification_block,
26712669
transfer_count: event.transfer_count,
26722670
funding_account: input.address.clone(),
26732671
});
@@ -2869,8 +2867,8 @@ mod tests {
28692867
let output_medium = compute_output_amount(input_medium, VOLUME_FEE_BPS);
28702868
assert_eq!(output_medium, 9990);
28712869
assert!(
2872-
(output_medium as u64) * 10000 <=
2873-
(input_medium as u64) * (10000 - VOLUME_FEE_BPS as u64)
2870+
(output_medium as u64) * 10000
2871+
<= (input_medium as u64) * (10000 - VOLUME_FEE_BPS as u64)
28742872
);
28752873

28762874
// Large amounts near u32::MAX

0 commit comments

Comments
 (0)