Prepare to rustfmt newly added files

In the next commit we'll `rustfmt` newly-added files, but before
we do so we clean up some code so that the resulting files won't be
quite as absurd. We also exclude the new `invoice_utils.rs` file,
as it needs quite substantial cleanups.
This commit is contained in:
Matt Corallo 2024-08-09 15:42:48 +00:00
parent 9c93bd56c2
commit 30879ed035
2 changed files with 4 additions and 4 deletions

View file

@ -186,6 +186,8 @@ mod tests {
let (payment_hash, payment_secret) =
nodes[1].node.create_inbound_payment(None, 7200, None).unwrap();
let secp_ctx = Secp256k1::new();
let node_secret = nodes[1].keys_manager.backing.get_node_secret_key();
let invoice = InvoiceBuilder::new(Currency::Bitcoin)
.description("test".into())
.payment_hash(Sha256::from_slice(&payment_hash.0).unwrap())
@ -194,10 +196,7 @@ mod tests {
.min_final_cltv_expiry_delta(144)
.amount_milli_satoshis(50_000)
.payment_metadata(payment_metadata.clone())
.build_signed(|hash| {
Secp256k1::new().sign_ecdsa_recoverable(hash,
&nodes[1].keys_manager.backing.get_node_secret_key())
})
.build_signed(|hash| secp_ctx.sign_ecdsa_recoverable(hash, &node_secret))
.unwrap();
let (hash, onion, params) = payment_parameters_from_invoice(&invoice).unwrap();

View file

@ -41,6 +41,7 @@
./lightning/src/ln/functional_test_utils.rs
./lightning/src/ln/functional_tests.rs
./lightning/src/ln/inbound_payment.rs
./lightning/src/ln/invoice_utils.rs
./lightning/src/ln/max_payment_path_len_tests.rs
./lightning/src/ln/mod.rs
./lightning/src/ln/monitor_tests.rs