Closed casey closed 1 year ago
Our taproot annex detection code looks wrong. It is currently:
let script = witness .iter() .nth(if annex { witness.len() - 1 } else { witness.len() - 2 }) .unwrap();
But it should be:
let script = witness .iter() .nth(if annex { witness.len() - 3 } else { witness.len() - 2 }) .unwrap();
Id est, if the annex is present, we look one more element back for the script.
You should prob use tapscript() from bitcoin::blockdata::witness::Witness
tapscript()
bitcoin::blockdata::witness::Witness
Our taproot annex detection code looks wrong. It is currently:
But it should be:
Id est, if the annex is present, we look one more element back for the script.