From 67ca3463c049a3f89a0a568d2a6e58259750be12 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Sat, 17 Dec 2022 16:32:14 -0800 Subject: [PATCH] Mention Script::is_v1_p2tr above Witness::tapscript --- bitcoin/src/blockdata/witness.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bitcoin/src/blockdata/witness.rs b/bitcoin/src/blockdata/witness.rs index 3061961e..7c54ee7d 100644 --- a/bitcoin/src/blockdata/witness.rs +++ b/bitcoin/src/blockdata/witness.rs @@ -312,9 +312,11 @@ impl Witness { /// Get Tapscript following BIP341 rules regarding accounting for an annex. /// - /// This does not guarantee that this represents a P2TR [`Witness`]. - /// It merely gets the second to last or third to last element depending - /// on the first byte of the last element being equal to 0x50. + /// This does not guarantee that this represents a P2TR [`Witness`]. It + /// merely gets the second to last or third to last element depending on + /// the first byte of the last element being equal to 0x50. See + /// [Script::is_v1_p2tr](crate::blockdata::script::Script::is_v1_p2tr) to + /// check whether this is actually a Taproot witness. pub fn tapscript(&self) -> Option<&[u8]> { let len = self.len(); self