You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Impl Jeff refactor: the advantage is that it keeps channel checks and updating pending_forward_info inside Channel rather than split between Channel and ChannelManager.
use ln::channelmanager::{HTLCSource,PaymentPreimage,PaymentHash,PendingHTLCStatus,PendingHTLCInfo,PendingHTLCRouting};
4439
+
use ln::channelmanager::{HTLCSource,PaymentPreimage,PaymentHash,PendingHTLCStatus,PendingHTLCInfo,PendingHTLCRouting,HTLCFailureMsg};
4435
4440
use ln::channel::{Channel,ChannelKeys,InboundHTLCOutput,OutboundHTLCOutput,InboundHTLCState,OutboundHTLCState,HTLCOutputInCommitment,TxCreationKeys,ChannelError};
4436
4441
use ln::channel::MAX_FUNDING_SATOSHIS;
4437
4442
use ln::features::{InitFeatures,NodeFeatures};
4438
-
use ln::msgs::{OptionalField,DataLossProtect,UpdateAddHTLC,OnionErrorPacket,OnionPacket};
4443
+
use ln::msgs::{OptionalField,DataLossProtect,UpdateAddHTLC,UpdateFailHTLC,OnionErrorPacket,OnionPacket};
4439
4444
use ln::{chan_utils, onion_utils};
4440
4445
use ln::chan_utils::{LocalCommitmentTransaction,ChannelPublicKeys};
4441
4446
use ln::features::ChannelFeatures;
@@ -4691,12 +4696,18 @@ mod tests {
4691
4696
amt_to_forward: max_can_recv + 1,
4692
4697
outgoing_cltv_value: htlc_cltv
4693
4698
});
4694
-
let create_onion_closure = |_chan:&Channel<EnforcingChannelKeys>,_pending_forward_info:&PendingHTLCStatus| {
4695
-
Some(OnionErrorPacket{data:vec![]})
4699
+
let create_pending_htlc_status = |chan:&Channel<EnforcingChannelKeys>,_pending_forward_info:&PendingHTLCStatus,_error_code:u16| {
0 commit comments