From 804a38cb67822f41d913fde7d8ebf4989486b4ad Mon Sep 17 00:00:00 2001 From: Tobin Harding Date: Fri, 19 Nov 2021 09:35:14 +1100 Subject: [PATCH] Improve documentation of `WitnessVersion` Attempt to improve the rustdocs for `WitnessVersion` in line with review comments from a previous patch. --- src/util/address.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/util/address.rs b/src/util/address.rs index 4a7e6144..52b2d302 100644 --- a/src/util/address.rs +++ b/src/util/address.rs @@ -177,11 +177,13 @@ impl FromStr for AddressType { } } -/// Version of the witness program: first byte of `scriptPubkey` in transaction output for -/// transactions starting with opcodes ranging from 0 to 16 (inclusive). +/// Version of the witness program. /// -/// Helps to limit possible version of the witness according to the specification; if a plain `u8` -/// type was be used instead it would mean that version may be > 16, which is incorrect. +/// Helps limit possible versions of the witness according to the specification. If a plain `u8` +/// type was used instead it would mean that the version may be > 16, which would be incorrect. +/// +/// First byte of `scriptPubkey` in transaction output for transactions starting with opcodes +/// ranging from 0 to 16 (inclusive). #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] #[repr(u8)] pub enum WitnessVersion {