Skip to content

Commit

Permalink
Merge pull request #274 from tnull/2024-03-271-followup
Browse files Browse the repository at this point in the history
Minor follow-up to #271
  • Loading branch information
tnull authored Mar 7, 2024
2 parents 02f0000 + d79b8ae commit 1cf74c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions tests/common.rs → tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ macro_rules! expect_payment_received_event {
println!("{} got event {:?}", $node.node_id(), e);
assert_eq!(amount_msat, $amount_msat);
$node.event_handled();
let result = Ok(payment_hash);
result
payment_hash
},
ref e => {
panic!("{} got unexpected event!: {:?}", std::stringify!(node_b), e);
Expand Down
6 changes: 2 additions & 4 deletions tests/integration_tests_rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use common::{
use ldk_node::{Builder, Event, NodeError};

use bitcoin::{Amount, Network};
use lightning::ln::PaymentHash;

use std::sync::Arc;

Expand Down Expand Up @@ -135,10 +134,9 @@ fn multi_hop_sending() {
let invoice = nodes[4].receive_payment(2_500_000, &"asdf", 9217).unwrap();
nodes[0].send_payment(&invoice).unwrap();

let payment_hash: Result<PaymentHash, ()> =
expect_payment_received_event!(&nodes[4], 2_500_000);
let payment_hash = expect_payment_received_event!(&nodes[4], 2_500_000);
let fee_paid_msat = Some(2000);
expect_payment_successful_event!(nodes[0], payment_hash.unwrap(), fee_paid_msat);
expect_payment_successful_event!(nodes[0], payment_hash, fee_paid_msat);
}

#[test]
Expand Down

0 comments on commit 1cf74c6

Please sign in to comment.