fn script_code_wpkh(script: &Script) -> Script {
    assert!(script.is_v0_p2wpkh());
    // ugly segwit stuff
    let mut script_code = vec![0x76u8, 0xa9, 0x14];
    script_code.extend(&script.as_bytes()[2..]);
    script_code.push(0x88);
    script_code.push(0xac);
    Script::from(script_code)
}
// Get a script from witness script pubkey hash
Get a script from witness script pubkey hash
Get a script from witness script pubkey hash
fn script_code_wpkh(script: &Script) -> Script {
    assert!(script.is_v0_p2wpkh());
    // ugly segwit stuff
    let mut script_code = vec![0x76u8, 0xa9, 0x14];
    script_code.extend(&script.as_bytes()[2..]);
    script_code.push(0x88);
    script_code.push(0xac);
    Script::from(script_code)
}
fn script_code_wpkh ( script : & Script ) -> Script { assert ! ( script is_v0_p2wpkh ( ) ) ; // ugly segwit stuff let mut script_code = vec ! [ 0x76u8 0xa9 0x14 ] ; script_code . extend ( & script . as_bytes ( ) [ 2 .. ] ) ; script_code . push ( 0x88 ) ; script_code . push ( 0xac ) ; Script :: from ( script_code ) }
Get a script from witness script pubkey hash
Get a script from witness script pubkey hash
script
&Script
script
&Script