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
* An empty script is only allowed when sent as upfront shutdown script,
so make sure that check is only done for accept/open_channel situations.
* Instead of reimplementing a variant of is_witness_script,
just call it and verify that the witness version is not 0.
* Fixed an outdated comment after a test copy/paste.
returnErr(ChannelError::Close(format!("Peer is signaling upfront_shutdown but has provided a non-accepted scriptpubkey format. script: ({})", script.to_bytes().to_hex())));
742
-
}
743
-
741
+
// Peer is signaling upfront_shutdown and has opt-out with a 0-length script. We don't enforce anything
744
742
if script.len() == 0{
745
743
None
744
+
// Peer is signaling upfront_shutdown and has provided a non-accepted scriptpubkey format. 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())));
returnErr(ChannelError::Close(format!("Peer is signaling upfront_shutdown but has provided a non-accepted scriptpubkey format. script: ({})", script.to_bytes().to_hex())));
1443
-
}
1444
-
1442
+
// Peer is signaling upfront_shutdown and has opt-out with a 0-length script. We don't enforce anything
1445
1443
if script.len() == 0{
1446
1444
None
1445
+
// Peer is signaling upfront_shutdown and has provided a non-accepted scriptpubkey format. 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())));
0 commit comments