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
Copy file name to clipboardExpand all lines: lightning/src/ln/channel.rs
+18-34Lines changed: 18 additions & 34 deletions
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@ use ln::{PaymentPreimage, PaymentHash};
26
26
use ln::features::{ChannelFeatures,InitFeatures};
27
27
use ln::msgs;
28
28
use ln::msgs::{DecodeError,OptionalField,DataLossProtect};
29
+
use ln::script::ShutdownScript;
29
30
use ln::channelmanager::{PendingHTLCStatus,HTLCSource,HTLCFailReason,HTLCFailureMsg,PendingHTLCInfo,RAACommitmentOrder,BREAKDOWN_TIMEOUT,MIN_CLTV_EXPIRY_DELTA,MAX_LOCAL_BREAKDOWN_TIMEOUT};
30
31
use ln::chan_utils::{CounterpartyCommitmentSecrets,TxCreationKeys,HTLCOutputInCommitment,HTLC_SUCCESS_TX_WEIGHT,HTLC_TIMEOUT_TX_WEIGHT, make_funding_redeemscript,ChannelPublicKeys,CommitmentTransaction,HolderCommitmentTransaction,ChannelTransactionParameters,CounterpartyChannelTransactionParameters,MAX_HTLCS, get_commitment_transaction_number_obscure_factor};
31
32
use ln::chan_utils;
@@ -43,11 +44,11 @@ use util::scid_utils::scid_from_parts;
returnErr(ChannelError::Close(format!("Peer is signaling upfront_shutdown but has provided a non-accepted scriptpubkey format. script: ({})", script.to_bytes().to_hex())));
Err(_) => returnErr(ChannelError::Close(format!("Peer is signaling upfront_shutdown but has provided a non-accepted scriptpubkey format. script: ({})", script.to_bytes().to_hex()))),
830
+
}
830
831
}
831
832
},
832
833
// Peer is signaling upfront shutdown but don't opt-out with correct mechanism (a.k.a 0-length script). Peer looks buggy, we fail the channel
returnErr(ChannelError::Close(format!("Peer is signaling upfront_shutdown but has provided a non-accepted scriptpubkey format. script: ({})", script.to_bytes().to_hex())));
Err(_) => returnErr(ChannelError::Close(format!("Peer is signaling upfront_shutdown but has provided a non-accepted scriptpubkey format. script: ({})", script.to_bytes().to_hex()))),
1557
+
}
1557
1558
}
1558
1559
},
1559
1560
// Peer is signaling upfront shutdown but don't opt-out with correct mechanism (a.k.a 0-length script). Peer looks buggy, we fail the channel
returnErr(ChannelError::Close(format!("Got shutdown request with a scriptpubkey ({}) which did not match their previous scriptpubkey.",msg.scriptpubkey.to_bytes().to_hex())));
returnErr(ChannelError::Close(format!("Got shutdown request with a scriptpubkey ({}) which did not match their previous scriptpubkey.",shutdown_scriptpubkey.to_bytes().to_hex())));
0 commit comments