@@ -1238,6 +1238,7 @@ pub(super) const FEERATE_TRACKING_BLOCKS: usize = 144;
12381238///
12391239/// Note that this struct will be removed entirely soon, in favor of storing no inbound payment data
12401240/// and instead encoding it in the payment secret.
1241+ #[derive(Debug)]
12411242struct PendingInboundPayment {
12421243 /// The payment secret that the sender must use for us to accept this payment
12431244 payment_secret: PaymentSecret,
@@ -12416,9 +12417,14 @@ where
1241612417 let _last_node_announcement_serial: u32 = Readable::read(reader)?; // Only used < 0.0.111
1241712418 let highest_seen_timestamp: u32 = Readable::read(reader)?;
1241812419
12419- // The last version where a pending inbound payment may have been written was 0.0.116.
12420+ // The last version where a pending inbound payment may have been added was 0.0.116.
1242012421 let pending_inbound_payment_count: u64 = Readable::read(reader)?;
12421- if pending_inbound_payment_count != 0 { return Err(DecodeError::InvalidValue) }
12422+ for _ in 0..pending_inbound_payment_count {
12423+ let payment_hash: PaymentHash = Readable::read(reader)?;
12424+ let logger = WithContext::from(&args.logger, None, None, Some(payment_hash));
12425+ let inbound: PendingInboundPayment = Readable::read(reader)?;
12426+ log_warn!(logger, "Ignoring deprecated pending inbound payment with payment hash {}: {:?}", payment_hash, inbound);
12427+ }
1242212428
1242312429 let pending_outbound_payments_count_compat: u64 = Readable::read(reader)?;
1242412430 let mut pending_outbound_payments_compat: HashMap<PaymentId, PendingOutboundPayment> =
0 commit comments