X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fscript.rs;h=595085114b0cdec9ee5e2988fa869f5a264eef35;hb=877a5fc9c0d7455bcbde8dbd9d314664bdcfba90;hp=0e25f46d472141fb2f1e7a2f58ada2bbabc25e15;hpb=1fd6c6fb9f7e58e8c0cf6539e7a9451e57a2b6fd;p=rust-lightning diff --git a/lightning/src/ln/script.rs b/lightning/src/ln/script.rs index 0e25f46d..59508511 100644 --- a/lightning/src/ln/script.rs +++ b/lightning/src/ln/script.rs @@ -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() { - script.is_witness_program() && script.as_bytes()[0] != SEGWIT_V0.into_u8() + script.is_witness_program() && script.as_bytes()[0] != SEGWIT_V0.to_u8() } else { false }