File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -13116,12 +13116,24 @@ where
13116
13116
// panic if we attempted to claim them at this point.
13117
13117
for (payment_hash, payment) in claimable_payments.iter() {
13118
13118
for htlc in payment.htlcs.iter() {
13119
- if htlc.prev_hop.counterparty_node_id.is_none() {
13119
+ if htlc.prev_hop.counterparty_node_id.is_some() {
13120
+ continue;
13121
+ }
13122
+ if short_to_chan_info.get(&htlc.prev_hop.short_channel_id).is_some() {
13123
+ log_error!(args.logger,
13124
+ "We do not have the required information to claim a pending payment with payment hash {} reliably.\
13125
+ As long as the channel for the inbound edge of the forward remains open, this may work okay, but we may panic at runtime!\
13126
+ All HTLCs that were received by LDK 0.0.123 and prior must be resolved prior to upgrading to LDK 0.1\
13127
+ Continuing anyway, though panics may occur!",
13128
+ payment_hash,
13129
+ );
13130
+ } else {
13120
13131
log_error!(args.logger,
13121
13132
"We do not have the required information to claim a pending payment with payment hash {}.\
13122
13133
All HTLCs that were received by LDK 0.0.123 and prior must be resolved prior to upgrading to LDK 0.1",
13123
13134
payment_hash,
13124
13135
);
13136
+ return Err(DecodeError::InvalidValue);
13125
13137
}
13126
13138
}
13127
13139
}
You can’t perform that action at this time.
0 commit comments