Skip to content

Commit

Permalink
f Account for upstream changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tnull committed Dec 5, 2022
1 parent 9d6324b commit 1ff2855
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,14 @@ where
}
}
}
LdkEvent::PaymentReceived { payment_hash, purpose, amount_msat } => {
LdkEvent::PaymentClaimable {
payment_hash,
purpose,
amount_msat,
receiver_node_id: _,
via_channel_id: _,
via_user_channel_id: _,
} => {
log_info!(
self.logger,
"Received payment from payment hash {} of {} millisatoshis",
Expand All @@ -368,9 +375,6 @@ where

if let Some(preimage) = payment_preimage {
self.channel_manager.claim_funds(preimage);
self.event_queue
.add_event(Event::PaymentReceived { payment_hash, amount_msat })
.expect("Failed to push to event queue");
} else {
log_error!(
self.logger,
Expand All @@ -379,7 +383,12 @@ where
);
}
}
LdkEvent::PaymentClaimed { payment_hash, purpose, amount_msat } => {
LdkEvent::PaymentClaimed {
payment_hash,
purpose,
amount_msat,
receiver_node_id: _,
} => {
log_info!(
self.logger,
"Claimed payment from payment hash {} of {} millisatoshis.",
Expand Down Expand Up @@ -409,6 +418,9 @@ where
});
}
}
self.event_queue
.add_event(Event::PaymentReceived { payment_hash, amount_msat })
.expect("Failed to push to event queue");
}
LdkEvent::PaymentSent { payment_preimage, payment_hash, fee_paid_msat, .. } => {
let mut payments = self.outbound_payments.lock().unwrap();
Expand Down Expand Up @@ -585,6 +597,7 @@ where
.expect("Failed to push to event queue");
}
LdkEvent::DiscardFunding { .. } => {}
LdkEvent::HTLCIntercepted { .. } => {}
}
}
}
Expand Down

0 comments on commit 1ff2855

Please sign in to comment.