projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Stop relying on `*Features::known` in functional test utils
[rust-lightning]
/
lightning
/
src
/
ln
/
script.rs
diff --git
a/lightning/src/ln/script.rs
b/lightning/src/ln/script.rs
index 7abe3060fa7b666f22fc83048ca330a194e3fdfb..595085114b0cdec9ee5e2988fa869f5a264eef35 100644
(file)
--- a/
lightning/src/ln/script.rs
+++ b/
lightning/src/ln/script.rs
@@
-16,7
+16,7
@@
use io;
/// A script pubkey for shutting down a channel as defined by [BOLT #2].
///
/// A script pubkey for shutting down a channel as defined by [BOLT #2].
///
-/// [BOLT #2]: https://github.com/lightning
network/lightning-rfc
/blob/master/02-peer-protocol.md
+/// [BOLT #2]: https://github.com/lightning
/bolts
/blob/master/02-peer-protocol.md
#[derive(Clone, PartialEq)]
pub struct ShutdownScript(ShutdownScriptImpl);
#[derive(Clone, PartialEq)]
pub struct ShutdownScript(ShutdownScriptImpl);
@@
-25,7
+25,7
@@
pub struct ShutdownScript(ShutdownScriptImpl);
pub struct InvalidShutdownScript {
/// The script that did not meet the requirements from [BOLT #2].
///
pub struct InvalidShutdownScript {
/// The script that did not meet the requirements from [BOLT #2].
///
- /// [BOLT #2]: https://github.com/lightning
network/lightning-rfc
/blob/master/02-peer-protocol.md
+ /// [BOLT #2]: https://github.com/lightning
/bolts
/blob/master/02-peer-protocol.md
pub script: Script
}
pub script: Script
}
@@
-122,7
+122,7
@@
pub(crate) fn is_bolt2_compliant(script: &Script, features: &InitFeatures) -> bo
if script.is_p2pkh() || script.is_p2sh() || script.is_v0_p2wpkh() || script.is_v0_p2wsh() {
true
} else if features.supports_shutdown_anysegwit() {
if script.is_p2pkh() || script.is_p2sh() || script.is_v0_p2wpkh() || script.is_v0_p2wsh() {
true
} else if features.supports_shutdown_anysegwit() {
- script.is_witness_program() && script.as_bytes()[0] != SEGWIT_V0.
in
to_u8()
+ script.is_witness_program() && script.as_bytes()[0] != SEGWIT_V0.to_u8()
} else {
false
}
} else {
false
}