Skip to content

Commit db3ceec

Browse files
committed
f Drop redundant payment state setting
1 parent 4633356 commit db3ceec

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/payment/bolt11.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,6 @@ impl Bolt11Payment {
100100
}
101101

102102
let invoice = maybe_deref(invoice);
103-
let payment_id = PaymentId(invoice.payment_hash().to_byte_array());
104-
if let Some(payment) = self.payment_store.get(&payment_id) {
105-
if payment.status == PaymentStatus::Pending
106-
|| payment.status == PaymentStatus::Succeeded
107-
{
108-
log_error!(self.logger, "Payment error: an invoice must not be paid twice.");
109-
return Err(Error::DuplicatePayment);
110-
}
111-
}
112-
113103
let payment_hash = PaymentHash(invoice.payment_hash().to_byte_array());
114104
let payment_id = PaymentId(invoice.payment_hash().to_byte_array());
115105
if let Some(payment) = self.payment_store.get(&payment_id) {

0 commit comments

Comments
 (0)