Skip to content

Commit 818551d

Browse files
committed
f Allow idempotent inbound BOLT12 hashes
Permit existing inbound BOLT12 records to accept an unchanged hash when failing a claimable payment. The remaining assertion still prevents changing an established hash. Co-Authored-By: HAL 9000
1 parent 506a5a1 commit 818551d

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

src/payment/store.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,6 @@ impl StorableObject for PaymentDetails {
181181
if let Some(hash_opt) = update.hash {
182182
match self.kind {
183183
PaymentKind::Bolt12Offer { ref mut hash, .. } => {
184-
debug_assert_eq!(
185-
self.direction,
186-
PaymentDirection::Outbound,
187-
"We should only ever override payment hash for outbound BOLT 12 payments"
188-
);
189184
debug_assert!(
190185
hash.is_none() || *hash == hash_opt,
191186
"We should never change a payment hash after being initially set"

0 commit comments

Comments
 (0)