Skip to content

Commit 83ee09e

Browse files
committed
f also check inbound payments
1 parent 9f339fc commit 83ee09e

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13111,6 +13111,21 @@ where
1311113111
}
1311213112
}
1311313113

13114+
// Similar to the above cases for forwarded payments, if we have any pending inbound HTLCs
13115+
// which haven't yet been claimed, we may be missing counterparty_node_id info and would
13116+
// panic if we attempted to claim them at this point.
13117+
for (payment_hash, payment) in claimable_payments.iter() {
13118+
for htlc in payment.htlcs.iter() {
13119+
if htlc.prev_hop.counterparty_node_id.is_none() {
13120+
log_error!(args.logger,
13121+
"We do not have the required information to claim a pending payment with payment hash {}.\
13122+
All HTLCs that were received by LDK 0.0.123 and prior must be resolved prior to upgrading to LDK 0.1",
13123+
payment_hash,
13124+
);
13125+
}
13126+
}
13127+
}
13128+
1311413129
let mut secp_ctx = Secp256k1::new();
1311513130
secp_ctx.seeded_randomize(&args.entropy_source.get_secure_random_bytes());
1311613131

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Backwards Compatibility
2-
* Nodes with pending forwarded HTLCs cannot be upgraded directly from 0.0.123
3-
or earlier to 0.1. Instead, they must first either resolve all pending
4-
forwarded HTLCs (including those pending resolution on-chain), or run
5-
0.0.124 and resolve any HTLCs that were originally forwarded running
6-
0.0.123 or earlier.
2+
* Nodes with pending forwarded HTLCs or unclaimed payments cannot be
3+
upgraded directly from 0.0.123 or earlier to 0.1. Instead, they must
4+
first either resolve all pending HTLCs (including those pending
5+
resolution on-chain), or run 0.0.124 and resolve any HTLCs that were
6+
originally forwarded or received running 0.0.123 or earlier.

0 commit comments

Comments
 (0)