@@ -10742,17 +10742,6 @@ where
10742
10742
}
10743
10743
}
10744
10744
10745
- if !forward_htlcs.is_empty() || pending_outbounds.needs_abandon() {
10746
- // If we have pending HTLCs to forward, assume we either dropped a
10747
- // `PendingHTLCsForwardable` or the user received it but never processed it as they
10748
- // shut down before the timer hit. Either way, set the time_forwardable to a small
10749
- // constant as enough time has likely passed that we should simply handle the forwards
10750
- // now, or at least after the user gets a chance to reconnect to our peers.
10751
- pending_events_read.push_back((events::Event::PendingHTLCsForwardable {
10752
- time_forwardable: Duration::from_secs(2),
10753
- }, None));
10754
- }
10755
-
10756
10745
let inbound_pmt_key_material = args.node_signer.get_inbound_payment_key_material();
10757
10746
let expanded_inbound_key = inbound_payment::ExpandedKey::new(&inbound_pmt_key_material);
10758
10747
@@ -10966,6 +10955,17 @@ where
10966
10955
.push(HTLCForwardInfo::FailMalformedHTLC { htlc_id, failure_code, sha256_of_onion });
10967
10956
}
10968
10957
10958
+ if !forward_htlcs.is_empty() || pending_outbounds.needs_abandon() {
10959
+ // If we have pending HTLCs to forward, assume we either dropped a
10960
+ // `PendingHTLCsForwardable` or the user received it but never processed it as they
10961
+ // shut down before the timer hit. Either way, set the time_forwardable to a small
10962
+ // constant as enough time has likely passed that we should simply handle the forwards
10963
+ // now, or at least after the user gets a chance to reconnect to our peers.
10964
+ pending_events_read.push_back((events::Event::PendingHTLCsForwardable {
10965
+ time_forwardable: Duration::from_secs(2),
10966
+ }, None));
10967
+ }
10968
+
10969
10969
let channel_manager = ChannelManager {
10970
10970
chain_hash,
10971
10971
fee_estimator: bounded_fee_estimator,
0 commit comments